code: def com_google_fonts_check_name_subfamilyname(ttFont,
                                                style_with_spaces,
                                                familyname_with_spaces):
    
    from fontbakery.utils import name_entry_id
  
    failed = False
    for name in ttFont['name'].names:
      if name.nameID == NameID.FONT_SUBFAMILY_NAME:
        if name.platformID == PlatformID.MACINTOSH:
          expected_value = style_with_spaces
  
        elif name.platformID == PlatformID.WINDOWS:
          if style_with_spaces in ["Bold", "Bold Italic"]:
            expected_value = style_with_spaces
          else:
            if "Italic" in style_with_spaces:
              expected_value = "Italic"
            else:
              expected_value = "Regular"
        else:
          yield FAIL, Message("invalid-entry",
                              ("Font should not have a "
                               "{} entry!").format(name_entry_id(name)))
          failed = True
          continue
  
        string = name.string.decode(name.getEncoding()).strip()
        if string != expected_value:
          failed = True
          yield FAIL, Message("bad-familyname",
                              ("Entry {} on the 'name' table: "
                               "Expected '{}' "
                               "but got '{}'.").format(name_entry_id(name),
                                                       expected_value,
                                                       string))
  
    if not failed:
      yield PASS, "FONT_SUBFAMILY_NAME entries are all good."
docs: Check name table: FONT_SUBFAMILY_NAME entries.