summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2019-10-24 05:03:12 +0300
committerRasmus Andersson <rasmus@notion.se>2019-10-24 05:03:12 +0300
commit9cb6c5faf62cee6a798097a773873aa270acf0fa (patch)
tree915653598dd62f407e2e6885332c5f6ac7901ce4
parent067b9689a3f2110f5279caa8c595668b094fa911 (diff)
downloadinter-9cb6c5faf62cee6a798097a773873aa270acf0fa.tar.xz
adds google style renaming for fullName and lLegacyName name records, for completeness even though it is not currently needed.
-rw-r--r--misc/fontbuildlib/name.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/misc/fontbuildlib/name.py b/misc/fontbuildlib/name.py
index c9e36b1ed..8e42f012c 100644
--- a/misc/fontbuildlib/name.py
+++ b/misc/fontbuildlib/name.py
@@ -73,11 +73,14 @@ def renameStylesGoogleFonts(font):
s = familyName + " " + removeWhitespace(s[start + len(familyName):])
else:
s = removeWhitespace(s)
+ if s != "Italic" and s.endswith("Italic"):
+ # fixup e.g. "ExtraBoldItalic" -> "ExtraBold Italic"
+ s = s[:len(s) - len("Italic")] + " Italic"
rec.string = s
if rid in (SUBFAMILY_NAME,) or rid in vfInstanceSubfamilyNameIds:
s = removeWhitespace(rec.toUnicode())
if s != "Italic" and s.endswith("Italic"):
- # fixup "ExtraBoldItalic" -> "ExtraBold Italic"
+ # fixup e.g. "ExtraBoldItalic" -> "ExtraBold Italic"
s = s[:len(s) - len("Italic")] + " Italic"
rec.string = s
# else: ignore standard names unrelated to style