类 FontUtil


  • public class FontUtil
    extends Object
    作者:
    yaqiang
    • 构造器详细资料

      • FontUtil

        public FontUtil()
    • 方法详细资料

      • getAllFonts

        public static List<Font> getAllFonts()
        Get all available fonts (system fonts, weather font and custom fonts)
        返回:
        Font list
      • registerFont

        public static void registerFont​(Font font)
        Register a font
        参数:
        font - The font
      • registerFont

        public static void registerFont​(String fileName)
        Register a font
        参数:
        fileName - Font file name
      • registerWeatherFont

        public static void registerWeatherFont()
        Register weather font
      • getFont

        public static Font getFont​(String fileName)
        Get font from font file - .ttf
        参数:
        fileName - Font file name
        返回:
        The font
      • getWeatherFont

        public static Font getWeatherFont()
        Get weather symbol font
        返回:
        Weather symbol font
      • getYaheiHybridFont

        public static Font getYaheiHybridFont()
        Get yahei consolas hybrid font
        返回:
        Yahei consolas hybrid font