Skip to content

Commit

Permalink
pytest 037: make sure we have rasterization support in ...
Browse files Browse the repository at this point in the history
... the freetype backend.
Right now this test will fail on Travis because I have not setup freetype there yet.
(issue fonttools#1524)
  • Loading branch information
felipesanches committed Sep 6, 2017
1 parent 2c6567f commit 4a8f1c8
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions Lib/fontbakery/specifications/googlefonts_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,11 +691,21 @@ def test_id_037():
from fontbakery.specifications.googlefonts import \
check_with_msfontvalidator as test
font = "data/test/mada/Mada-Regular.ttf"
# RASTER_EXCEPTION_MESSAGE = ("MS-FonVal: An exception occurred"
# " during rasterization testing")
# for status, message in test(font):
# assert RASTER_EXCEPTION_MESSAGE not in message
status, message = list(test(font))[-1]
RASTER_EXCEPTION_MESSAGE = ("MS-FonVal: An exception occurred"
" during rasterization testing")
# we want to run all FValidator tests only once,
# so here we cache all results:
fval_results = list(test(font))

# Then we make sure that the freetype backend we're using
# supports the hinting instructions validation tests,
# which are refered to as "rasterization testing":
# (See also: https://github.com/googlefonts/fontbakery/issues/1524)
for status, message in fval_results:
assert RASTER_EXCEPTION_MESSAGE not in message

# and finaly, we make sure that there wasn't an ERROR
# which would mean FontValidator is not properly installed:
assert status != ERROR

# TODO: test_id_038
Expand Down

0 comments on commit 4a8f1c8

Please sign in to comment.