@@ -147,7 +147,7 @@ def test_report_cmd_reportstring_typolinegap(capsys):
147
147
assert "[OS/2] TypoLineGap: \t 410" in out
148
148
149
149
150
- def test_report_cmd_reportstring_typoA_typoD (capsys ):
150
+ def test_report_cmd_reportstring_typoA_typodesc (capsys ):
151
151
from fontline .app import main
152
152
filepath = os .path .join ('tests' , 'testingfiles' , 'Hack-Regular.ttf' )
153
153
sys .argv = ['font-line' , 'report' , filepath ]
@@ -156,7 +156,7 @@ def test_report_cmd_reportstring_typoA_typoD(capsys):
156
156
assert "[OS/2] TypoAscender to TypoDescender: \t 2048" in out
157
157
158
158
159
- def test_report_cmd_reportstring_winA_winD (capsys ):
159
+ def test_report_cmd_reportstring_winA_windesc (capsys ):
160
160
from fontline .app import main
161
161
filepath = os .path .join ('tests' , 'testingfiles' , 'Hack-Regular.ttf' )
162
162
sys .argv = ['font-line' , 'report' , filepath ]
@@ -174,7 +174,7 @@ def test_report_cmd_reportstring_ascent_descent(capsys):
174
174
assert "[hhea] Ascent to Descent: \t \t 2384" in out
175
175
176
176
177
- def test_report_cmd_reportstring_winA_typoA (capsys ):
177
+ def test_report_cmd_reportstring_winA_typoasc (capsys ):
178
178
from fontline .app import main
179
179
filepath = os .path .join ('tests' , 'testingfiles' , 'Hack-Regular.ttf' )
180
180
sys .argv = ['font-line' , 'report' , filepath ]
@@ -183,7 +183,7 @@ def test_report_cmd_reportstring_winA_typoA(capsys):
183
183
assert "WinAscent to TypoAscender: \t 345" in out
184
184
185
185
186
- def test_report_cmd_reportstring_ascent_typoA (capsys ):
186
+ def test_report_cmd_reportstring_ascent_typoasc (capsys ):
187
187
from fontline .app import main
188
188
filepath = os .path .join ('tests' , 'testingfiles' , 'Hack-Regular.ttf' )
189
189
sys .argv = ['font-line' , 'report' , filepath ]
@@ -192,7 +192,7 @@ def test_report_cmd_reportstring_ascent_typoA(capsys):
192
192
assert "Ascent to TypoAscender: \t 345" in out
193
193
194
194
195
- def test_report_cmd_reportstring_winD_typoD (capsys ):
195
+ def test_report_cmd_reportstring_winD_typodesc (capsys ):
196
196
from fontline .app import main
197
197
filepath = os .path .join ('tests' , 'testingfiles' , 'Hack-Regular.ttf' )
198
198
sys .argv = ['font-line' , 'report' , filepath ]
@@ -201,7 +201,7 @@ def test_report_cmd_reportstring_winD_typoD(capsys):
201
201
assert "WinDescent to TypoDescender: \t -9" in out
202
202
203
203
204
- def test_report_cmd_reportstring_descent_typoD (capsys ):
204
+ def test_report_cmd_reportstring_descent_typodesc (capsys ):
205
205
from fontline .app import main
206
206
filepath = os .path .join ('tests' , 'testingfiles' , 'Hack-Regular.ttf' )
207
207
sys .argv = ['font-line' , 'report' , filepath ]
@@ -210,11 +210,28 @@ def test_report_cmd_reportstring_descent_typoD(capsys):
210
210
assert "Descent to TypoDescender: \t -9" in out
211
211
212
212
213
- def test_report_cmd_reportstring_typolinegap_to_upm (capsys ):
213
+ def test_report_cmd_reportstring_typo_to_upm (capsys ):
214
214
from fontline .app import main
215
215
filepath = os .path .join ('tests' , 'testingfiles' , 'Hack-Regular.ttf' )
216
216
sys .argv = ['font-line' , 'report' , filepath ]
217
217
main ()
218
218
out , err = capsys .readouterr ()
219
- assert "TypoLineGap / UPM: \t 0 .2" in out
219
+ assert "(Typo Asc + Desc + Linegap) / UPM: \t 1 .2" in out
220
220
221
+
222
+ def test_report_cmd_reportstring_win_to_upm (capsys ):
223
+ from fontline .app import main
224
+ filepath = os .path .join ('tests' , 'testingfiles' , 'Hack-Regular.ttf' )
225
+ sys .argv = ['font-line' , 'report' , filepath ]
226
+ main ()
227
+ out , err = capsys .readouterr ()
228
+ assert "(winAsc + winDesc) / UPM: \t \t 1.16" in out
229
+
230
+
231
+ def test_report_cmd_reportstring_hhea_to_upm (capsys ):
232
+ from fontline .app import main
233
+ filepath = os .path .join ('tests' , 'testingfiles' , 'Hack-Regular.ttf' )
234
+ sys .argv = ['font-line' , 'report' , filepath ]
235
+ main ()
236
+ out , err = capsys .readouterr ()
237
+ assert "(hhea Asc + Desc) / UPM: \t \t 1.16" in out
0 commit comments