-
Notifications
You must be signed in to change notification settings - Fork 96
Add way to enable OVERLAP_SIMPLE or OVERLAP_COMPOUND #681
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 ou 8000 r terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See also fonttools/fonttools#1518 |
yeah, makes sense that we enable those flags when --keep-overlaps is set. Environments that don't use the flag will simply ignore it. Can you send a PR? |
Actually, for Vollkorn instances, the overlaps are removed for simple glyphs but the overla
8000
p issue occurs with composite glyphs. So the |
Hum. I suppose one could check if the bounding boxes of contours or components overlap and set |
Thought I'd just post a similar issue to this thread. We're getting requests from the Android team to enable bit 6 for VF glyphs which contain overlapping contours, google/fonts#4405. Here's a previous discussion related to this issue and the implications for setting it may have, Since I need to enable this bit for our VF font collection, I plan to write a very primitive solution since my graphics/2d knowledge is weak. I don't want to enable this bit for every glyph since it will hammer FreeType. My plan is to detect which glyphs have overlaps by duplicating a glyph's outlines, removing the overlaps on the duplicates and then diffing the areas. This is probably too computationally expensive to include in fontmake so I'll just write it as a gftools script to begin with. |
@m4rc1e nope, use the code in google/fonts#4405 (comment) and integrate it into ufo2ft if it's not there already, we use it in production and it completes in no time. I think I barely measured any compilation time increase. |
Thanks! Have you measured what impact this will have on FreeType? |
Nope! But you need it for overlaps anyway so you have to pay the price 😬 |
Do we have data on the range of % total glyphs with overlapping contours in "typical" VF families? I'm guessing that this falls into the many bucket, and not none, few, most, or all? @m4rc1e the only reference that I've come across on the FT impact issue is in fonttools/fonttools#2059 (comment) and related to static instance rendering
|
I got two figures here: google/fonts#4405 (comment) |
The answer is few, many, and most. :) |
In Science Gothic and an unnamed Google internal project I am working on, the answer is on the order of 1% or 2%. Mind you, it is currently going up, and will be higher in future projects, because I know that a solution to make the rendering perfect is in the works. I have avoided it in the past, only choosing overlap as a sort of lesser evil. But if it can render correctly, then I will use it more. |
There doesn’t seem to be a way to enable OVERLAP_SIMPLE in
ttglyph.flags
or OVERLAP_COMPOUND inttglyph.components[0].flags
. These are required for correct handling of overlaps on macOS.Could
--keep-overlaps
enable these when generatingttf
?See davelab6/Vollkorn-Typeface#8 (comment)
The text was updated successfully, but these errors were encountered: