summaryrefslogtreecommitdiff
path: root/scripts/touchup_for_web.py
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2015-01-13 10:00:04 -0800
committerJames Godfrey-Kittle <jamesgk@google.com>2015-04-16 12:16:25 -0700
commitd5d62b219ca099784b732927035e37a2470c5c04 (patch)
treec662d49ffd429bf3d9c24dd92395f55714afe4bf /scripts/touchup_for_web.py
parent29257870e8eb50be42c0e36f70c88817c0a9ce50 (diff)
Fix name table overrides for condensed fonts.
Fixes issue 104 and issue 105.
Diffstat (limited to 'scripts/touchup_for_web.py')
-rwxr-xr-xscripts/touchup_for_web.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/touchup_for_web.py b/scripts/touchup_for_web.py
index 8760394..628374a 100755
--- a/scripts/touchup_for_web.py
+++ b/scripts/touchup_for_web.py
@@ -27,6 +27,9 @@ def apply_web_specific_fixes(font, family_name):
'Medium', 'Medium Italic',
'Bold', 'Bold Italic',
'Black', 'Black Italic'])
+
+ if 'Condensed' in font_data.get_name_records(font)[1]:
+ family_name += ' Condensed'
full_name = family_name + ' ' + subfamily_name
# Family name
@@ -40,7 +43,7 @@ def apply_web_specific_fixes(font, family_name):
# PostScript name
font_data.set_name_record(
- font, 6, family_name+'-'+subfamily_name.replace(' ', ''))
+ font, 6, (family_name+'-'+subfamily_name).replace(' ', ''))
def correct_font(source_font_name, target_font_name, family_name):