-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some glyphs fails to render in COLRv1 variable font which renders fine in Chrome #276
Comments
Thanks for reporting! It's a good old ZeroDivisionError :) https://github.com/BlackFoundryCom/black-renderer/blob/main/Lib/blackrenderer/font.py#L459-L469 I'lve opened an issue in blackrenderer: BlackFoundryCom/black-renderer#113 |
(Most likely because the points of a linear gradient are simply overlapping.) |
Btw. the fonttools subsetter stumbles over the the |
Will check that, thanks! That happens with the original or modified font? |
The modified font, the original has a format 0 CPAL table. |
Some investigation: I checked how B (gid 13) is built and found that the original font has one of the gradients made like this: If I read COLRv1 spec correctly, that makes zero-length gradient line, which is technically wrong:
I think that we have 1) problem in the source Nabla font 2) same problem but packed differently in the converted font 3) issue in the renderer which should be more tolerant to such cases. |
I've fixed the ZeroDivisionError in the meantime (BlackFoundryCom/black-renderer#114), but I need to investigate the zero-length gradient (justvanrossum/nabla#41). |
That's the first gradient "shape" in B, easy to spot. |
This should be fixed in FontGoggle 1.7.0: https://github.com/justvanrossum/fontgoggles/releases |
A sample VF built with FontLab using latest varLib and Nabla sources fails to render certain glyphs in the latest FG.
Same font renders fine in Chrome.
Font is attached ("A" is modified as a marker).
It is possible that font has its own issues (we continue testing it), but I think it may actually be an issue in FG rendering, as COLRv1 is relatively new tech.
Nabla-VF.ttf.zip
FG (with the original Nabla and modified/problematic version):
Same modified font in Chrome:
The text was updated successfully, but these errors were encountered: