@@ -8,7 +8,6 @@ def __init__(self, tt, filepath):
8
8
self .tt = tt
9
9
self .filepath = filepath
10
10
self .sha1 = get_sha1 (self .filepath )
11
- namerecord_list = tt ["name" ].names
12
11
# Version string
13
12
self .version = ""
14
13
for needle in tt ["name" ].names :
@@ -38,7 +37,9 @@ def __init__(self, tt, filepath):
38
37
39
38
# Bit flag checks
40
39
self .fsselection_bit7_mask = 1 << 7
41
- self .fsselection_bit7_set = (tt ["OS/2" ].fsSelection & self .fsselection_bit7_mask ) != 0
40
+ self .fsselection_bit7_set = (
41
+ tt ["OS/2" ].fsSelection & self .fsselection_bit7_mask
42
+ ) != 0
42
43
43
44
# Calculated values
44
45
self .os2_typo_total_height = self .os2_typo_ascender - self .os2_typo_descender
@@ -48,14 +49,15 @@ def __init__(self, tt, filepath):
48
49
self .hhea_btb_distance = self .hhea_total_height + self .hhea_linegap
49
50
self .typo_btb_distance = self .os2_typo_total_height + self .os2_typo_linegap
50
51
self .win_external_leading = self .hhea_linegap - (
51
- (self .os2_win_ascent + self .os2_win_descent ) - (self .hhea_ascent - self .hhea_descent )
52
+ (self .os2_win_ascent + self .os2_win_descent )
53
+ - (self .hhea_ascent - self .hhea_descent )
52
54
)
53
55
if self .win_external_leading < 0 :
54
56
self .win_external_leading = 0
55
- self .win_btb_distance = self .os2_win_ascent + self .os2_win_descent + self .win_external_leading
57
+ self .win_btb_distance = (
58
+ self .os2_win_ascent + self .os2_win_descent + self .win_external_leading
59
+ )
56
60
57
61
self .typo_to_upm = 1.0 * self .typo_btb_distance / self .units_per_em
58
62
self .winascdesc_to_upm = 1.0 * self .win_btb_distance / self .units_per_em
59
63
self .hheaascdesc_to_upm = 1.0 * self .hhea_btb_distance / self .units_per_em
60
-
61
-
0 commit comments