Skip to content

Commit b3730ff

Browse files
committed
add tests for OS/2.fsSelection bit 7 set reporting
1 parent 00c2f41 commit b3730ff

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/test_report_cmd.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,3 +271,24 @@ def test_report_cmd_reportstring_hhea_to_upm(capsys):
271271
main()
272272
out, err = capsys.readouterr()
273273
assert "hhea metrics / UPM: 1.16" in out
274+
275+
276+
def test_report_cmd_reportstring_fsselection_bit7_set_true(capsys):
277+
from fontline.app import main
278+
filepath = os.path.join('tests', 'testingfiles', 'Hack-Regular-fsSelection-bit7-set.ttf')
279+
sys.argv = ['font-line', 'report', filepath]
280+
main()
281+
out, err = capsys.readouterr()
282+
assert "[OS/2] fsSelection USE_TYPO_METRICS bit set: True" in out
283+
284+
285+
def test_report_cmd_reportstring_fsselection_bit7_set_false(capsys):
286+
from fontline.app import main
287+
filepath = os.path.join('tests', 'testingfiles', 'Hack-Regular.ttf')
288+
sys.argv = ['font-line', 'report', filepath]
289+
main()
290+
out, err = capsys.readouterr()
291+
assert "[OS/2] fsSelection USE_TYPO_METRICS bit set: False" in out
292+
293+
294+
# TODO: add tests for new baseline to baseline distance calculations in report

0 commit comments

Comments
 (0)