mirror of
https://github.com/rsms/inter.git
synced 2024-12-24 16:14:35 +03:00
fontbuild: set postscriptName in addition to fullName to "Inter" for variable fonts. Also trims whitespace from names in name.renameStylesGoogleFonts
This commit is contained in:
parent
9cb6c5faf6
commit
86ba62ee30
@ -36,6 +36,8 @@ def setFullName(font, fullName):
|
||||
nameTable = font["name"]
|
||||
nameTable.setName(fullName, FULL_NAME, 1, 0, 0) # mac
|
||||
nameTable.setName(fullName, FULL_NAME, 3, 1, 0x409) # windows
|
||||
nameTable.setName(fullName, POSTSCRIPT_NAME, 1, 0, 0) # mac
|
||||
nameTable.setName(fullName, POSTSCRIPT_NAME, 3, 1, 0x409) # windows
|
||||
|
||||
|
||||
def getFamilyName(font):
|
||||
@ -76,13 +78,13 @@ def renameStylesGoogleFonts(font):
|
||||
if s != "Italic" and s.endswith("Italic"):
|
||||
# fixup e.g. "ExtraBoldItalic" -> "ExtraBold Italic"
|
||||
s = s[:len(s) - len("Italic")] + " Italic"
|
||||
rec.string = s
|
||||
rec.string = s.strip()
|
||||
if rid in (SUBFAMILY_NAME,) or rid in vfInstanceSubfamilyNameIds:
|
||||
s = removeWhitespace(rec.toUnicode())
|
||||
if s != "Italic" and s.endswith("Italic"):
|
||||
# fixup e.g. "ExtraBoldItalic" -> "ExtraBold Italic"
|
||||
s = s[:len(s) - len("Italic")] + " Italic"
|
||||
rec.string = s
|
||||
rec.string = s.strip()
|
||||
# else: ignore standard names unrelated to style
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user