code: def com_google_fonts_check_mac_style(ttFont, style):
    
    from fontbakery.utils import check_bit_entry
    from fontbakery.constants import MacStyle
  
    # Checking macStyle ITALIC bit:
    expected = "Italic" in style
    yield check_bit_entry(ttFont, "head", "macStyle",
                          expected,
                          bitmask=MacStyle.ITALIC,
                          bitname="ITALIC")
  
    # Checking macStyle BOLD bit:
    expected = style in ["Bold", "BoldItalic"]
    yield check_bit_entry(ttFont, "head", "macStyle",
                          expected,
                          bitmask=MacStyle.BOLD,
                          bitname="BOLD")
docs: Checking head.macStyle value.