From 9cb6c5faf62cee6a798097a773873aa270acf0fa Mon Sep 17 00:00:00 2001 From: Rasmus Andersson Date: Wed, 23 Oct 2019 19:03:12 -0700 Subject: adds google style renaming for fullName and lLegacyName name records, for completeness even though it is not currently needed. --- misc/fontbuildlib/name.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'misc/fontbuildlib') 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 -- cgit v1.2.3