code: def have_font(font_name):
      
      if font_name in font_dir:
          return True
  
      # try it as an alias
      font_name = resolve_alias(font_name, font_name)
      return font_name in font_dir
docs: Return True if the given font name is registered as one of our
      externally loadable fonts.  If `font_name` is not found, it will try
      to look it up as an alias and report if that is found.