docs: def com_google_fonts_check_name_license_url(ttFont, familyname):
    """"License URL matches License text on name table?"""
    from fontbakery.constants import PLACEHOLDER_LICENSING_TEXT
    LEGACY_UFL_FAMILIES = ["Ubuntu", "UbuntuCondensed", "UbuntuMono"]
    LICENSE_URL = {
      'OFL.txt': 'http://scripts.sil.org/OFL',
      'LICENSE.txt': 'http://www.apache.org/licenses/LICENSE-2.0',
      'UFL.txt': 'https://www.ubuntu.com/legal/terms-and-policies/font-licence'
    }
    LICENSE_NAME = {
      'OFL.txt': 'Open Font',
      'LICENSE.txt': 'Apache',
      'UFL.txt': 'Ubuntu Font License'
    }
    detected_license = False
    for license in ['OFL.txt', 'LICENSE.txt', 'UFL.txt']:
      placeholder = PLACEHOLDER_LICENSING_TEXT[license]
      for nameRecord in ttFont['name'].names:
        string = nameRecord.string.decode(nameRecord.getEncoding())
        if nameRecord.nameID == NameID.LICENSE_DESCRIPTION and\
           string == placeholder:
          detected_license = license
          break
  
    if detected_license == "UFL.txt" and familyname not in LEGACY_UFL_FAMILIES:
      yield FAIL, Message("ufl",
                          ("The Ubuntu Font License is only acceptable on"
                           " the Google Fonts collection for legacy font"
                           " families that already adopted such license."
                           " New Families should use eigther Apache or"
                           " Open Font License."))
    else:
      found_good_entry = False
      if detected_license:
        failed = False
        expected = LICENSE_URL[detected_license]
        for nameRecord in ttFont['name'].names:
          if nameRecord.nameID == NameID.LICENSE_INFO_URL:
            string = nameRecord.string.decode(nameRecord.getEncoding())
            if string == expected:
              found_good_entry = True
            else:
              failed = True
              yield FAIL, Message("licensing-inconsistency",
                                  ("Licensing inconsistency in name table"
                                   " entries! NameID={} (LICENSE DESCRIPTION)"
                                   " indicates {} licensing, but NameID={}"
                                   " (LICENSE URL) has '{}'. Expected: '{}'"
                                   "").format(NameID.LICENSE_DESCRIPTION,
                                              LICENSE_NAME[detected_license],
                                              NameID.LICENSE_INFO_URL,
                                              string, expected))
      if not found_good_entry:
        yield FAIL, Message("no-license-found",
                            ("A known license URL must be provided in the"
                             " NameID {} (LICENSE INFO URL) entry."
                             " Currently accepted licenses are Apache or"
                             " Open Font License. For a small set of legacy"
                             " families the Ubuntu Font License may be"
                             " acceptable as well."
                             "").format(NameID.LICENSE_INFO_URL))
      else:
        if failed:
          yield FAIL, Message("bad-entries",
                              ("Even though a valid license URL was seen in"
                               " NAME table, there were also bad entries."
                               " Please review NameIDs {} (LICENSE DESCRIPTION)"
                               " and {} (LICENSE INFO URL)."
                               "").format(NameID.LICENSE_DESCRIPTION,
                                          NameID.LICENSE_INFO_URL))
        else:
          yield PASS, "Font has a valid license URL in NAME table."