Closed rsheeter closed 1 week ago
You asked the very same question one year ago :)
https://github.com/googlefonts/fontmake/issues/1003#issuecomment-1571665084
It's a workaround for some ancient macOS which didn't even officially support OT variations, we can choose not to follow fonttools and prune these in ttx_diff.py
The reason we haven't changed it in fonttools is because nobody bothered. We could, but not huge priority
This issue may also be relevant https://github.com/googlefonts/fontmake/issues/360
LOL I'm err ... consistent :D
The MacRoman is smaller since it encodes as 8bit; name
table doesn't support UTF-8, so otherwise we'd be encoding as UTF-16.
The MacRoman is smaller
If we only did Mac Roman, sure, but we're inconsistently (only for font-specific names) doing it in addition to windows names. From reading the associated issues this seems undesirable, maybe we can fix Python?
Maybe fontmake should only add mac for font-specific names if it has mac names for other names? - exploratory hackery in https://github.com/fonttools/fonttools/pull/3688 to exhibit
Maybe fontmake should only add mac for font-specific names if it has mac names for other names? - exploratory hackery in fonttools/fonttools#3688 to exhibit
I'm inclined to say we should add only MacRoman if name is ASCII.
I'm inclined to say we should add only MacRoman if name is ASCII.
I believe it's safer to just use Windows Unicode names for all nowadays, even if it cost a few extra bytes.
Since the name IDs are greater than 256, I reckon it's coming from the stat builder https://github.com/fonttools/fonttools/blob/main/Lib/fontTools/otlLib/builder.py#L2694.
thanks marc for reminding of that. I think in the particular example that Rod used (GrenzeGotisch.glyphs), the otlLib.buildStatTable is not called, because that's only used by varLib when the input is a designspace v5 with STAT-related attributes and glyphsLib which created the DS+UFOs doesn't export those. But yeah https://github.com/fonttools/fonttools/pull/3688 ought to take care of those too.
python resources/scripts/ttx_diff.py 'https://github.com/Omnibus-Type/Grenze-Gotisch#sources/GrenzeGotisch.glyphs' --compare gftools --config ~/.fontc_crater_cache/Omnibus-Type/Grenze-Gotisch/sources/config.yaml
fails on name.In poking at this it seems that fontmake adds mac (
platformID="1" platEncID="0" langID="0x0"
) names for the font-specific (id >= 256) names while fontc does not. Amending fontc to do the same, e.g. to also insert a mac name at https://github.com/googlefonts/fontc/blob/5ba53cf1d77d28483e6853438f9300195acaa566/fontir/src/ir.rs#L438, makes ttx_diff pass but that seems odd.Perhaps this is a case where we should alter fontmake? Or is there a reason this behavior is correct?
For example: