Test check 075
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals, division
+import os
+
+from fontTools.ttLib import TTFont
from fontbakery.checkrunner import (
DEBUG
, INFO
@@ -13,7 +16,6 @@ from fontbakery.checkrunner import (
check_statuses = (ERROR, FAIL, SKIP, PASS, WARN, INFO, DEBUG)
-# from fontTools.ttLib import TTFont
def NOT_IMPLEMENTED_test_check_069():
""" Is there any unused data at the end of the glyf table? """
@@ -26,11 +28,16 @@ def NOT_IMPLEMENTED_test_check_069():
# - PASS, "There is no unused data at the end of the glyf table."
-def NOT_IMPLEMENTED_test_check_075():
+def test_check_075():
""" Check for points out of bounds. """
- # from fontbakery.specifications.general import com_google_fonts_check_075 as check
- # TODO: Implement-me!
- #
- # code-paths:
- # - WARN, "Some glyphs have out of bounds coordinates."
- # - PASS, "All glyph paths have coordinates within bounds!"
+ from fontbakery.specifications.glyf import com_google_fonts_check_075 as check
+
+ test_font = TTFont(
+ os.path.join("data", "test", "nunito", "Nunito-Regular.ttf"))
+ status, _ = list(check(test_font))[-1]
+ assert status == WARN
+
+ test_font2 = TTFont(
+ os.path.join("data", "test", "familysans", "FamilySans-Regular.ttf"))
+ status, _ = list(check(test_font2))[-1]
+ assert status == PASS
