-
Notifications
You must be signed in to change notification settings - Fork 9
Localized family and style names #9
Comments
Interesting! What is the |
See https://www.microsoft.com/typography/otspec/name.htm (nameID 16/17). |
Wouldn’t it be better if the English names fell back on the attributes of the instance element? <instance familyname="Montserrat" stylename="SemiBold" stylemapfamilyname="Montserrat SemiBold" stylemapstylename="Regular" ...>
<familyName xml:lang="ja">モンセラート</familyName>
<styleName xml:lang="de">Halbfett</styleName>
<styleMapFamilyName xml:lang="de">Montserrat Halbfett</styleMapFamilyName>
<styleMapFamilyName xml:lang="ja">モンセラート SemiBold</styleMapFamilyName>
<styleMapStyleName xml:lang="de">Standard</styleMapStyleName>
<location>...</location>
<kerning />
<info />
</instance> would be the same as <instance familyname="Montserrat" stylename="SemiBold" stylemapfamilyname="Montserrat SemiBold" stylemapstylename="Regular" ...>
<familyName xml:lang="en">Montserrat</familyName>
<familyName xml:lang="ja">モンセラート</familyName>
<styleName xml:lang="en">Fett</styleName>
<styleName xml:lang="de">Halbfett</styleName>
<styleMapFamilyName xml:lang="en">Montserrat SemiBold</styleMapFamilyName>
<styleMapFamilyName xml:lang="de">Montserrat Halbfett</styleMapFamilyName>
<styleMapFamilyName xml:lang="ja">モンセラート SemiBold</styleMapFamilyName>
<styleMapStyleName xml:lang="en">Regular</styleMapStyleName>
<styleMapStyleName xml:lang="de">Standard</styleMapStyleName>
<location>...</location>
<kerning />
<info />
</instance> Maybe these elements should be in the info element. |
I think Maybe analogous to the
|
I've sketched out some support for localised styleName, familyName, styleMapStyleName and and styleMapFamilyName. These values can roundtrip. I think it would be useful to write these localised names to UFO as well (well, at least to UFO3). It seems they can be written to Suggestions? |
Looks good to me. We shall add support in varLib to set localised instances names when building fvar using this new
The name table module contains mappings between Windows or Mac langID codes and IETF BCP-47 language tags and the Note that this is not being used in varLib's fvar builder yet though, we still only add English names (cf. fonttools/fonttools#930) Maybe designSpaceDocument/mutatorMath can do the same for UFO3 openTypeNameRecords? |
The OpenType
name
table supports localized family and style names. Likewise do font editors such as Glyphs. If the designspace document format supported this, glyphsLib could copy the localized names into the designspace instead of throwing the information away. Proposal:The name-related attributes of
instance
would be handled as if the corresponding element was supplying an English string. For example,<instance familyname="Foo" stylename="Semibold">
would be treated as if the designspace document looked like this:varLib would probably use the
typographicStyleName
for naming instances, usingstyleName
as fallback if notypographicStyleName
was present.The text was updated successfully, but these errors were encountered: