java.lang.Object
me.m64diamondstar.dialoguemaster.api.utils.FontUtils

public class FontUtils extends Object
Utilities for fonts. Primarily used for importing fonts.
  • Constructor Details

    • FontUtils

      public FontUtils()
  • Method Details

    • getFontFormatFromUrl

      public static String getFontFormatFromUrl(String urlString) throws IOException
      Gets the font format of a URL.
      Parameters:
      urlString - The URL to get the format from.
      Returns:
      The font format (either "ttf" or "otf").
      Throws:
      IOException
    • isSupportedFormat

      public static boolean isSupportedFormat(String format)
      Checks if a format is supported. (Supported formats are ttf and otf)
      Parameters:
      format - The format to check.
      Returns:
      True if the format is supported, false otherwise.
    • isValidURL

      public static boolean isValidURL(String url)
      Checks if a URL is valid.
      Parameters:
      url - The URL to check.
      Returns:
      True if the URL is valid, false otherwise.
    • isValidFont

      public static boolean isValidFont(String url)
      Checks if a font URL is valid and supported.
      Parameters:
      url - The URL to check.
      Returns:
      True if the font URL is valid and supported, false otherwise.