We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3087bf9 commit 123fbb7Copy full SHA for 123fbb7
lib/fontline/commands.py
@@ -19,8 +19,14 @@ def get_font_report(fontpath):
19
os2_win_ascent = tt['OS/2'].usWinAscent
20
os2_win_descent = tt['OS/2'].usWinDescent
21
os2_typo_linegap = tt['OS/2'].sTypoLineGap
22
- os2_x_height = tt['OS/2'].sxHeight
23
- os2_cap_height = tt['OS/2'].sCapHeight
+ try:
+ os2_x_height = tt['OS/2'].sxHeight
24
+ except AttributeError as e:
25
+ os2_x_height = "---- (OS/2 table does not contain sxHeight record)"
26
27
+ os2_cap_height = tt['OS/2'].sCapHeight
28
29
+ os2_cap_height = "---- (OS/2 table does not contain sCapHeight record)"
30
hhea_ascent = tt['hhea'].ascent
31
hhea_descent = tt['hhea'].descent
32
hhea_linegap = tt['hhea'].lineGap
0 commit comments