-
Notifications
You must be signed in to change notification settings - Fork 94
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
Reading familyName from public.fontInfo and writing into variable font #1113
Comments
Here is a small test setup. After running P.S. Should this issue be placed in ufo2ft? Apologies if so! |
thanks for the bug report and the reproducer. It is supposed to work, yes. Support for "public.fontInfo" key of |
ok so, the variable-font's public.fontInfo below <key>public.fontInfo</key>
<dict>
<key>familyName</key>
<string>TestTest Variable</string>
<key>styleMapFamilyName</key>
<string>TestTest Variable</string>
<key>styleMapStyleName</key>
<string>regular</string>
<key>styleName</key>
<string>Regular</string>
</dict> currently generates the following name table: <name>
<namerecord nameID="256" platformID="1" platEncID="0" langID="0x0" unicode="True">
Weight
</namerecord>
<namerecord nameID="257" platformID="1" platEncID="0" langID="0x0" unicode="True">
Foobar2
</namerecord>
<namerecord nameID="258" platformID="1" platEncID="0" langID="0x0" unicode="True">
Foobar 1
</namerecord>
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
TestTest Variable
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
Regular
</namerecord>
<namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
0.000;NONE;Foobar-Foobar2
</namerecord>
<namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
Foobar Foobar2
</namerecord>
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
Version 0.000
</namerecord>
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
Foobar-Foobar2
</namerecord>
<namerecord nameID="16" platformID="3" platEncID="1" langID="0x409">
Foobar
</namerecord>
<namerecord nameID="17" platformID="3" platEncID="1" langID="0x409">
Foobar2
</namerecord>
<namerecord nameID="18" platformID="3" platEncID="1" langID="0x409">
Foobar Foobar2
</namerecord>
<namerecord nameID="256" platformID="3" platEncID="1" langID="0x409">
Weight
</namerecord>
<namerecord nameID="257" platformID="3" platEncID="1" langID="0x409">
Foobar2
</namerecord>
<namerecord nameID="258" platformID="3" platEncID="1" langID="0x409">
Foobar 1
</namerecord>
</name> @ryanbugden just to confirm, is the expected result that all the occurrences of "Foobar" be replaced by "TestTest Variable" (i.e. the overridden value of familyName)? |
I see what's going on. Basically the variable-font's public.fontInfo gets merged into the default UFO's fontinfo.plist, overriding those individual fields that are mentioned in the former, but the other ones that you do not override stay unchanged. The merged info is then used to build the various tables, including name table. |
Thank you for looking into this @anthrotype ! That all makes sense now. I'm curious as to how I can override nameID 16 and 17. Overriding all of the font info keys that are in the default UFO, as below, doesn't seem to remove <key>familyName</key>
<string>TestTest Variable</string>
<key>styleName</key>
<string>Regular</string>
<key>styleMapFamilyName</key>
<string>TestTest Variable</string>
<key>styleMapStyleName</key>
<string>regular</string>
<key>postscriptFontName</key>
<string>TestTest-Variable</string>
<key>postscriptFullName</key>
<string>TestTestVariable</string>
<key>postscriptWeightName</key>
<string>Normal</string>
<key>openTypeNameCompatibleFullName</key>
<string>TestTest Variable</string>
<key>openTypeNamePreferredFamilyName</key>
<string>TestTest Variable</string>
<key>openTypeNamePreferredSubfamilyName</key>
<string>Regular</string> Unrelated, but is there a standard for how to treat the style/subfamily name in a variable font? Follow the default instance? Fold that style name into FullNames as well? |
When I generate a variable font, the
public.fontInfo['familyName']
doesn't seem to be considered during compilation.I see there has been some work done on the fontTools side. Is there still some work to be done there, or is the ball in the fontmake court?
fonttools/fonttools#2606
I have a workflow set up wherein there is a working dated Beta variable font being distributed while a final font is being tested/developed/not distributed. I need these variable fonts to have different family names from each other, and ideally, I would like to not have to change the family name of the default source UFO during the generation workflow.
Thanks!
The text was updated successfully, but these errors were encountered: