1
1
mirror of https://github.com/rsms/inter.git synced 2024-11-23 11:43:47 +03:00

fix bug in fontbuild that would set OT subfamily name to italic

This commit is contained in:
Rasmus Andersson 2018-09-03 16:59:01 -07:00
parent cd784d8172
commit 4cba11837b

View File

@ -77,7 +77,7 @@ def setFontInfo(font, weight, updateCreated=True):
# name ID 17 "Typographic Subfamily name"
subfamily = subfamily_re.sub('\\1', style) # "A Italic" => "A", "A" => "A"
if len(subfamily) == 0:
if len(subfamily) == 0 or subfamily.strip().lower() == 'italic':
subfamily = "Regular"
font.info.openTypeNamePreferredSubfamilyName = subfamily