Skip to content

Commit

Permalink
adds google style renaming for fullName and lLegacyName name records,…
Browse files Browse the repository at this point in the history
… for completeness even though it is not currently needed.
  • Loading branch information
rsms committed Oct 24, 2019
1 parent 067b968 commit 9cb6c5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion misc/fontbuildlib/name.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9cb6c5f

Please sign in to comment.