Skip to content

Commit

Permalink
Use conditions instead of manually skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledhosny committed Feb 29, 2024
1 parent 3f6c401 commit e4e1981
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Lib/fontbakery/checks/opentype/head.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fractions

from fontbakery.callable import check
from fontbakery.status import FAIL, PASS, WARN, SKIP
from fontbakery.status import FAIL, PASS, WARN
from fontbakery.message import Message
from fontbakery.constants import NameID

Expand Down Expand Up @@ -184,17 +184,14 @@ def com_google_fonts_check_font_version(ttFont):
that describe whether a font is bold and/or italic must be coherent with the
actual style of the font as inferred by its filename.
""",
conditions=["style"],
proposal="legacy:check/131",
)
def com_google_fonts_check_mac_style(font):
"""Checking head.macStyle value."""
from fontbakery.utils import check_bit_entry
from fontbakery.constants import MacStyle

if font.style is None:
yield SKIP, "Font style could not be determined."
return

# Checking macStyle ITALIC bit:
expected = "Italic" in font.style
yield check_bit_entry(
Expand Down

0 comments on commit e4e1981

Please sign in to comment.