Class FontConverter

java.lang.Object
dev.cerus.maps.api.font.FontConverter

public class FontConverter extends Object
Converts regular Java fonts into MapFonts
  • Field Details

  • Method Details

    • convert

      public static MapFont convert(Font font, String textToCheck)
      Convert the specified font into a MapFont. Since we can't get a list of supported codepoints from the font object you have to specify each individual character that you want us to convert.

      Unsupported codepoints will be ignored.

      Parameters:
      font - The Java font
      textToCheck - The characters that you want us to convert
      Returns:
      The converted font
    • convert

      public static MapFont convert(Font font, Collection<Integer> codepoints)
      Convert the specified font into a MapFont. Since we can't get a list of supported codepoints from the font object you have to specify each individual character that you want us to convert.

      Unsupported codepoints will be ignored.

      Parameters:
      font - The Java font
      codepoints - The codepoints that you want us to convert
      Returns:
      The converted font
    • convert

      public static MapFont convert(Font font, int lowest, int highest)
      Convert the specified font into a MapFont. Since we can't get a list of supported codepoints from the font object you have to specify each individual character that you want us to convert.

      Unsupported codepoints will be ignored.

      Parameters:
      font - The Java font
      lowest - The lowest codepoint
      highest - The highest codepoint
      Returns:
      The converted font
    • convertAllUnicode

      public static MapFont convertAllUnicode(Font font)
      Convert the specified font into a MapFont. This method will attempt to convert all unicode characters.

      Unsupported codepoints will be ignored.

      Parameters:
      font - The Java font
      Returns:
      The converted font