Class MGL_FontUtils

java.lang.Object
tech.mgl.core.utils.MGL_FontUtils

public class MGL_FontUtils extends Object
Author:
www.mgl.tech
  • Constructor Details

    • MGL_FontUtils

      public MGL_FontUtils()
  • Method Details

    • fontToImage

      public static void fontToImage(String str, Font font, File outFile) throws Exception
      Parameters:
      str -
      font -
      outFile -
      Throws:
      Exception - 参数
    • fontToImage

      public static void fontToImage(String str, Color color, Font font, File outFile) throws Exception
      Parameters:
      str -
      color -
      font -
      outFile -
      Throws:
      Exception - 参数
    • fontToImage

      public static void fontToImage(String str, Font font, Color color, File outFile, double scaleX, double scaleY) throws Exception
      Parameters:
      str -
      font -
      color -
      outFile -
      Throws:
      Exception - 参数
    • getRandomFont

      public static Font getRandomFont()
      随机获取字体
      Returns:
      Font
    • getRandomFont

      public static Font getRandomFont(int fontSize)
      随机获取字体
      Parameters:
      fontSize - fontSize
      Returns:
      Font
    • main

      public static void main(String[] args)