Package dev.cerus.maps.api.font
Class FontConverter
java.lang.Object
dev.cerus.maps.api.font.FontConverter
Converts regular Java fonts into MapFonts
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic MapFontConvert the specified font into a MapFont.static MapFontConvert the specified font into a MapFont.static MapFontconvert(Font font, Collection<Integer> codepoints)Convert the specified font into a MapFont.static MapFontconvertAllUnicode(Font font)Convert the specified font into a MapFont.
-
Field Details
-
ASCII
All Ascii chars -
UMLAUTS
All German umlauts- See Also:
- Constant Field Values
-
SHARP_S
Sharp s ("Eszett", "scharfes S")- See Also:
- Constant Field Values
-
-
Method Details
-
convert
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 fonttextToCheck- The characters that you want us to convert- Returns:
- The converted font
-
convert
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 fontcodepoints- The codepoints that you want us to convert- Returns:
- The converted font
-
convert
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 fontlowest- The lowest codepointhighest- The highest codepoint- Returns:
- The converted font
-
convertAllUnicode
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
-