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