-
Notifications
You must be signed in to change notification settings - Fork 12
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
Port fonttools optimized PairPos subtable splitting? #612
Comments
Does fontmake set this to on by default? If not, why not and do specific families actually enable it? |
no it does not set it on by default, for it makes the build slower in exchange for smaller file size and not all fonts may enjoy substantial savings, it's mostly for multi-script projects. It made more sense before ufo2ft switched to one kern lookup per script, when it was doing one lookup per horizontal direction, as the latter is sparser than then former (for one can't kern across script boundaries). The work also predates the move to one-lookup-per-script. |
actually, we would still need to do the GSUB closure regardless, because of the need to separate the LTR from the RTL kerning pairs (each requires a different kind of value record). |
Based on ^ I will close. Please reopen if there is reason to believe that there are file size benefits remaining even after doing split-by-script. |
Yes indeed, if you split by script then then the GPOS compaction is a very minor improvement. (thanks Cosimo for pointing out RTL vs LTR, I didn't realise that) |
@belluzj wrote in #610 (comment)
The code is here:
https://github.com/fonttools/fonttools/blob/main/Lib/fontTools/otlLib/optimize/gpos.py
It can be enabled by setting a config option on a TTFont before compiling, takes numbers from 0 (disabled by default) to 9:
https://github.com/fonttools/fonttools/blob/2b115eaae83dddb2638b079c7e88bda2e94cd6f9/Lib/fontTools/config/__init__.py#L25-L37
It's also possible to run as CLI on existing font file with
fonttools otlLib.optimize --help
The text was updated successfully, but these errors were encountered: