Class MinecraftFont
java.lang.Object
com.imyeyu.fx.ui.MinecraftFont
- All Implemented Interfaces:
TimiFXUI
-
Nested Class Summary
Nested classes/interfaces inherited from interface TimiFXUI
TimiFXUI.BG, TimiFXUI.Colorful, TimiFXUI.CSS, TimiFXUI.Shadow, TimiFXUI.Stroke -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int特大号,128 像素static int小号,16 像素static int中号,32 像素static int大号,64 像素Fields inherited from interface TimiFXUI
CSS_FONT, CSS_STYLE, MULTILINGUAL, RESOURCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javafx.scene.text.Fontbuild(int size) 构建字体,Minecraft 字体在 16 的公倍数时渲染最佳static voidcss(javafx.scene.Node node, int size) 通过 CSS 修改字号,请置于组件样式修改的最后static javafx.scene.text.FontX128()获取特大号字体 X128static javafx.scene.text.FontX16()获取小号字体 X16static javafx.scene.text.FontX32()获取中号字体 X32static javafx.scene.text.FontX64()获取大号字体 X64
-
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:
- 字体
-