@@ -120,15 +120,15 @@ def test_percent_cmd_ttf_file_10_percent_default_approach(capsys):
120
120
121
121
tt = ttLib .TTFont (newfont_path )
122
122
123
- os2_typo_ascender = tt ['OS/2' ].__dict__ [ ' sTypoAscender' ]
124
- os2_typo_descender = tt ['OS/2' ].__dict__ [ ' sTypoDescender' ]
125
- os2_win_ascent = tt ['OS/2' ].__dict__ [ ' usWinAscent' ]
126
- os2_win_descent = tt ['OS/2' ].__dict__ [ ' usWinDescent' ]
127
- os2_typo_linegap = tt ['OS/2' ].__dict__ [ ' sTypoLineGap' ]
128
- hhea_ascent = tt ['hhea' ].__dict__ [ ' ascent' ]
129
- hhea_descent = tt ['hhea' ].__dict__ [ ' descent' ]
130
- hhea_linegap = tt ['hhea' ].__dict__ [ ' lineGap' ]
131
- units_per_em = tt ['head' ].__dict__ [ ' unitsPerEm' ]
123
+ os2_typo_ascender = tt ['OS/2' ].sTypoAscender
124
+ os2_typo_descender = tt ['OS/2' ].sTypoDescender
125
+ os2_win_ascent = tt ['OS/2' ].usWinAscent
126
+ os2_win_descent = tt ['OS/2' ].usWinDescent
127
+ os2_typo_linegap = tt ['OS/2' ].sTypoLineGap
128
+ hhea_ascent = tt ['hhea' ].ascent
129
+ hhea_descent = tt ['hhea' ].descent
130
+ hhea_linegap = tt ['hhea' ].lineGap
131
+ units_per_em = tt ['head' ].unitsPerEm
132
132
133
133
assert os2_typo_ascender == 1556
134
134
assert os2_typo_descender == - 492
@@ -166,15 +166,15 @@ def test_percent_cmd_otf_file_10_percent_default_approach(capsys):
166
166
167
167
tt = ttLib .TTFont (newfont_path )
168
168
169
- os2_typo_ascender = tt ['OS/2' ].__dict__ [ ' sTypoAscender' ]
170
- os2_typo_descender = tt ['OS/2' ].__dict__ [ ' sTypoDescender' ]
171
- os2_win_ascent = tt ['OS/2' ].__dict__ [ ' usWinAscent' ]
172
- os2_win_descent = tt ['OS/2' ].__dict__ [ ' usWinDescent' ]
173
- os2_typo_linegap = tt ['OS/2' ].__dict__ [ ' sTypoLineGap' ]
174
- hhea_ascent = tt ['hhea' ].__dict__ [ ' ascent' ]
175
- hhea_descent = tt ['hhea' ].__dict__ [ ' descent' ]
176
- hhea_linegap = tt ['hhea' ].__dict__ [ ' lineGap' ]
177
- units_per_em = tt ['head' ].__dict__ [ ' unitsPerEm' ]
169
+ os2_typo_ascender = tt ['OS/2' ].sTypoAscender
170
+ os2_typo_descender = tt ['OS/2' ].sTypoDescender
171
+ os2_win_ascent = tt ['OS/2' ].usWinAscent
172
+ os2_win_descent = tt ['OS/2' ].usWinDescent
173
+ os2_typo_linegap = tt ['OS/2' ].sTypoLineGap
174
+ hhea_ascent = tt ['hhea' ].ascent
175
+ hhea_descent = tt ['hhea' ].descent
176
+ hhea_linegap = tt ['hhea' ].lineGap
177
+ units_per_em = tt ['head' ].unitsPerEm
178
178
179
179
assert os2_typo_ascender == 1556
180
180
assert os2_typo_descender == - 492
@@ -212,15 +212,15 @@ def test_percent_cmd_ttf_file_30_percent_default_approach(capsys):
212
212
213
213
tt = ttLib .TTFont (newfont_path )
214
214
215
- os2_typo_ascender = tt ['OS/2' ].__dict__ [ ' sTypoAscender' ]
216
- os2_typo_descender = tt ['OS/2' ].__dict__ [ ' sTypoDescender' ]
217
- os2_win_ascent = tt ['OS/2' ].__dict__ [ ' usWinAscent' ]
218
- os2_win_descent = tt ['OS/2' ].__dict__ [ ' usWinDescent' ]
219
- os2_typo_linegap = tt ['OS/2' ].__dict__ [ ' sTypoLineGap' ]
220
- hhea_ascent = tt ['hhea' ].__dict__ [ ' ascent' ]
221
- hhea_descent = tt ['hhea' ].__dict__ [ ' descent' ]
222
- hhea_linegap = tt ['hhea' ].__dict__ [ ' lineGap' ]
223
- units_per_em = tt ['head' ].__dict__ [ ' unitsPerEm' ]
215
+ os2_typo_ascender = tt ['OS/2' ].sTypoAscender
216
+ os2_typo_descender = tt ['OS/2' ].sTypoDescender
217
+ os2_win_ascent = tt ['OS/2' ].usWinAscent
218
+ os2_win_descent = tt ['OS/2' ].usWinDescent
219
+ os2_typo_linegap = tt ['OS/2' ].sTypoLineGap
220
+ hhea_ascent = tt ['hhea' ].ascent
221
+ hhea_descent = tt ['hhea' ].descent
222
+ hhea_linegap = tt ['hhea' ].lineGap
223
+ units_per_em = tt ['head' ].unitsPerEm
224
224
225
225
assert os2_typo_ascender == 1556
226
226
assert os2_typo_descender == - 492
@@ -260,15 +260,15 @@ def test_percent_cmd_ttf_file_10_percent_google_approach(capsys):
260
260
261
261
tt = ttLib .TTFont (newfont_path )
262
262
263
- os2_typo_ascender = tt ['OS/2' ].__dict__ [ ' sTypoAscender' ]
264
- os2_typo_descender = tt ['OS/2' ].__dict__ [ ' sTypoDescender' ]
265
- os2_win_ascent = tt ['OS/2' ].__dict__ [ ' usWinAscent' ]
266
- os2_win_descent = tt ['OS/2' ].__dict__ [ ' usWinDescent' ]
267
- os2_typo_linegap = tt ['OS/2' ].__dict__ [ ' sTypoLineGap' ]
268
- hhea_ascent = tt ['hhea' ].__dict__ [ ' ascent' ]
269
- hhea_descent = tt ['hhea' ].__dict__ [ ' descent' ]
270
- hhea_linegap = tt ['hhea' ].__dict__ [ ' lineGap' ]
271
- units_per_em = tt ['head' ].__dict__ [ ' unitsPerEm' ]
263
+ os2_typo_ascender = tt ['OS/2' ].sTypoAscender
264
+ os2_typo_descender = tt ['OS/2' ].sTypoDescender
265
+ os2_win_ascent = tt ['OS/2' ].usWinAscent
266
+ os2_win_descent = tt ['OS/2' ].usWinDescent
267
+ os2_typo_linegap = tt ['OS/2' ].sTypoLineGap
268
+ hhea_ascent = tt ['hhea' ].ascent
269
+ hhea_descent = tt ['hhea' ].descent
270
+ hhea_linegap = tt ['hhea' ].lineGap
271
+ units_per_em = tt ['head' ].unitsPerEm
272
272
273
273
assert os2_typo_ascender == 885
274
274
assert os2_typo_descender == - 215
@@ -306,15 +306,15 @@ def test_percent_cmd_ttf_file_30_percent_google_approach(capsys):
306
306
307
307
tt = ttLib .TTFont (newfont_path )
308
308
309
- os2_typo_ascender = tt ['OS/2' ].__dict__ [ ' sTypoAscender' ]
310
- os2_typo_descender = tt ['OS/2' ].__dict__ [ ' sTypoDescender' ]
311
- os2_win_ascent = tt ['OS/2' ].__dict__ [ ' usWinAscent' ]
312
- os2_win_descent = tt ['OS/2' ].__dict__ [ ' usWinDescent' ]
313
- os2_typo_linegap = tt ['OS/2' ].__dict__ [ ' sTypoLineGap' ]
314
- hhea_ascent = tt ['hhea' ].__dict__ [ ' ascent' ]
315
- hhea_descent = tt ['hhea' ].__dict__ [ ' descent' ]
316
- hhea_linegap = tt ['hhea' ].__dict__ [ ' lineGap' ]
317
- units_per_em = tt ['head' ].__dict__ [ ' unitsPerEm' ]
309
+ os2_typo_ascender = tt ['OS/2' ].sTypoAscender
310
+ os2_typo_descender = tt ['OS/2' ].sTypoDescender
311
+ os2_win_ascent = tt ['OS/2' ].usWinAscent
312
+ os2_win_descent = tt ['OS/2' ].usWinDescent
313
+ os2_typo_linegap = tt ['OS/2' ].sTypoLineGap
314
+ hhea_ascent = tt ['hhea' ].ascent
315
+ hhea_descent = tt ['hhea' ].descent
316
+ hhea_linegap = tt ['hhea' ].lineGap
317
+ units_per_em = tt ['head' ].unitsPerEm
318
318
319
319
assert os2_typo_ascender == 985
320
320
assert os2_typo_descender == - 315
@@ -355,15 +355,15 @@ def test_percent_cmd_ttf_file_10_percent_adobe_approach(capsys):
355
355
356
356
tt = ttLib .TTFont (newfont_path )
357
357
358
- os2_typo_ascender = tt ['OS/2' ].__dict__ [ ' sTypoAscender' ]
359
- os2_typo_descender = tt ['OS/2' ].__dict__ [ ' sTypoDescender' ]
360
- os2_win_ascent = tt ['OS/2' ].__dict__ [ ' usWinAscent' ]
361
- os2_win_descent = tt ['OS/2' ].__dict__ [ ' usWinDescent' ]
362
- os2_typo_linegap = tt ['OS/2' ].__dict__ [ ' sTypoLineGap' ]
363
- hhea_ascent = tt ['hhea' ].__dict__ [ ' ascent' ]
364
- hhea_descent = tt ['hhea' ].__dict__ [ ' descent' ]
365
- hhea_linegap = tt ['hhea' ].__dict__ [ ' lineGap' ]
366
- units_per_em = tt ['head' ].__dict__ [ ' unitsPerEm' ]
358
+ os2_typo_ascender = tt ['OS/2' ].sTypoAscender
359
+ os2_typo_descender = tt ['OS/2' ].sTypoDescender
360
+ os2_win_ascent = tt ['OS/2' ].usWinAscent
361
+ os2_win_descent = tt ['OS/2' ].usWinDescent
362
+ os2_typo_linegap = tt ['OS/2' ].sTypoLineGap
363
+ hhea_ascent = tt ['hhea' ].ascent
364
+ hhea_descent = tt ['hhea' ].descent
365
+ hhea_linegap = tt ['hhea' ].lineGap
366
+ units_per_em = tt ['head' ].unitsPerEm
367
367
368
368
assert os2_typo_ascender == 750
369
369
assert os2_typo_descender == - 250
@@ -401,15 +401,15 @@ def test_percent_cmd_ttf_file_30_percent_adobe_approach(capsys):
401
401
402
402
tt = ttLib .TTFont (newfont_path )
403
403
404
- os2_typo_ascender = tt ['OS/2' ].__dict__ [ ' sTypoAscender' ]
405
- os2_typo_descender = tt ['OS/2' ].__dict__ [ ' sTypoDescender' ]
406
- os2_win_ascent = tt ['OS/2' ].__dict__ [ ' usWinAscent' ]
407
- os2_win_descent = tt ['OS/2' ].__dict__ [ ' usWinDescent' ]
408
- os2_typo_linegap = tt ['OS/2' ].__dict__ [ ' sTypoLineGap' ]
409
- hhea_ascent = tt ['hhea' ].__dict__ [ ' ascent' ]
410
- hhea_descent = tt ['hhea' ].__dict__ [ ' descent' ]
411
- hhea_linegap = tt ['hhea' ].__dict__ [ ' lineGap' ]
412
- units_per_em = tt ['head' ].__dict__ [ ' unitsPerEm' ]
404
+ os2_typo_ascender = tt ['OS/2' ].sTypoAscender
405
+ os2_typo_descender = tt ['OS/2' ].sTypoDescender
406
+ os2_win_ascent = tt ['OS/2' ].usWinAscent
407
+ os2_win_descent = tt ['OS/2' ].usWinDescent
408
+ os2_typo_linegap = tt ['OS/2' ].sTypoLineGap
409
+ hhea_ascent = tt ['hhea' ].ascent
410
+ hhea_descent = tt ['hhea' ].descent
411
+ hhea_linegap = tt ['hhea' ].lineGap
412
+ units_per_em = tt ['head' ].unitsPerEm
413
413
414
414
assert os2_typo_ascender == 750
415
415
assert os2_typo_descender == - 250
0 commit comments