feat(ui): T3 CJK 字体随包落码——Fusion Pixel OFL zh_hans 入包接线(2026-09-27 用户拍板)

- 资产: game/assets/fonts/ui_font_fusion_pixel_zh_hans.ttf + OFL-fusion-pixel.txt 授权随包(授权干净定案);命名遵 art-bible §8.3 snake_case 域前缀
- project.godot gui/theme/custom_font=全 Control 默认主题字体单点
- SubViewport 两世界不继承 Control 主题: ui_assembler 装配点经 UiKit.load_font 守卫装载注入 set_world_font(C6 挂点链首次接线,缺位=null 回退引擎字体不炸)
- 单元断言: tests/unit/presentation/ui_font_asset_test.gd(装载非空/中文字形 has_char/采样宽度>0)入 run_all manifest(8 套件)
- 轻闸: 冒烟 557/0+ui_probe(hp='攻击 2 ' 中文渲染断言不减)+ui_input_probe+ui_click_probe 全绿
This commit is contained in:
DKChan committed 2026-09-28 03:13:54 +08:00
1 parent 7c9320b98e
commit a0ed48fa88
8 files changed
+165

No files matched your search

+11
View File
@@ -106,6 +106,17 @@ static func load_tex(path: String) -> Texture2D:
return null
# CJK 随包字体(2026-09-27 用户拍板 Fusion Pixel OFL——CJK 覆盖+授权干净;命名遵 art-bible §8.3
# 全小写 snake_case 域前缀)。守卫装载同 load_tex 纪律:缺位返回 null(引擎回退字体接手,不炸)。
const FONT_UI := "res://assets/fonts/ui_font_fusion_pixel_zh_hans.ttf"
static func load_font(path: String) -> Font:
if ResourceLoader.exists(path):
var res: Resource = load(path)
return res as Font
return null
# ── StyleBox 工厂 ──
# margin = (左, 上, 右, 下);border_w = 0 即无边框(根底/遮罩用)
static func panel_flat(bg: Color, border: Color, corner: int = 0, border_w: int = 1, margin: Vector4 = Vector4.ZERO) -> StyleBoxFlat: