Fonttools: pyftsubset: Keep featureVariations

Created on 12 Oct 2020  路  4Comments  路  Source: fonttools/fonttools

Hi,
is there a way to keep GSUB鈥檚 featureVariations and the corresponding lookups?

My code:
pyftsubset font.ttf --recommended-glyphs --notdef-outline --layout-scripts='DFLT,latn' --layout-features='kern' --unicodes-file=Trial_unicodes.txt --glyphs-file=Trial_names.txt --recalc-timestamp --name-IDs='*' --name-legacy --name-languages='*' --ignore-missing-glyphs --ignore-missing-unicodes

Thanks in advance!
Christoph

Most helpful comment

"rvrn" should be in the list of features that are kept by default. If you use += instead of =, e.g. --layout-features+='kern', the subsetter will _add_ "kern" to the list of features that are kept by default. You can do --layout-features=? to see the full list of default features.
If you use = it will _only_ keep the specified features (in your example, only kern, thus dropping rvrn among others).

All 4 comments

Wild guess: are you sure it doesn't get killed by --layout-features='kern'? You may want to include rvrn there, or whichever feature you use for feature variations.

Yes, I use rvrn, and this indeed did the trick. 馃き Thanks a lot, Just!!

"rvrn" should be in the list of features that are kept by default. If you use += instead of =, e.g. --layout-features+='kern', the subsetter will _add_ "kern" to the list of features that are kept by default. You can do --layout-features=? to see the full list of default features.
If you use = it will _only_ keep the specified features (in your example, only kern, thus dropping rvrn among others).

Thanks a lot, Cosimo! I had read this in --help but somehow I went for --layout-features-= with all default ones but kern and rvrn first, which didn鈥檛 work.
With --layout-features='kern,rvrn' it works like I wanted: Only kernand rvrnleft.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

typoman picture typoman  路  9Comments

KatjaSchimmel picture KatjaSchimmel  路  5Comments

RomulBY picture RomulBY  路  4Comments

antonxheight picture antonxheight  路  3Comments

behdad picture behdad  路  8Comments