Class MinecraftFont

java.lang.Object
com.imyeyu.fx.ui.MinecraftFont
All Implemented Interfaces:
TimiFXUI

public class MinecraftFont extends Object implements TimiFXUI
Minecraft 字体,此字体为点阵字体,不会模糊渲染,在 16,32,64,128 像素时最为清晰
Since:
2021-04-14 00:11
Author:
夜雨
  • Field Details

    • X16

      public static int X16
      小号,16 像素
    • X32

      public static int X32
      中号,32 像素
    • X64

      public static int X64
      大号,64 像素
    • X128

      public static int X128
      特大号,128 像素
  • Constructor Details

    • MinecraftFont

      public MinecraftFont()
  • Method Details

    • css

      public static void css(javafx.scene.Node node, int size)
      通过 CSS 修改字号,请置于组件样式修改的最后
      Parameters:
      node - 组件
      size - 字号,单位:像素
    • X16

      public static javafx.scene.text.Font X16()
      获取小号字体 X16
      Returns:
      小号字体
    • X32

      public static javafx.scene.text.Font X32()
      获取中号字体 X32
      Returns:
      中号字体
    • X64

      public static javafx.scene.text.Font X64()
      获取大号字体 X64
      Returns:
      大号字体
    • X128

      public static javafx.scene.text.Font X128()
      获取特大号字体 X128
      Returns:
      特大号字体
    • build

      public static javafx.scene.text.Font build(int size)
      构建字体,Minecraft 字体在 16 的公倍数时渲染最佳
      Parameters:
      size - 字号
      Returns:
      字体