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:
1 parent
7c9320b98e
commit
a0ed48fa88
8 files changed
+165
No files matched your search
@@ -40,6 +40,14 @@ static func build_battle_ui(root: Control, db) -> Dictionary:
|
||||
var settlement_fx := SettlementFxView.new()
|
||||
root.add_child(settlement_fx)
|
||||
|
||||
# CJK 字体随包(2026-09-27 用户拍板 Fusion Pixel OFL):Control 侧默认主题字体走 project.godot
|
||||
# gui/theme/custom_font;SubViewport 两世界不继承 Control 主题——显式注入挂点接线(C6 挂点链)。
|
||||
# 缺位守卫(load_font 返回 null = 引擎回退字体,与旧 Button 渲染同源,不炸)。
|
||||
var ui_font: Font = UiKit.load_font(UiKit.FONT_UI)
|
||||
if ui_font != null:
|
||||
stage.set_world_font(ui_font)
|
||||
board_zone.board_view.set_world_font(ui_font)
|
||||
|
||||
# GP/钥石余额位已随 2026-09-26 信息归属拍板退役(中/大循环资源迁出战斗屏——
|
||||
# GP 去向 = 关卡画面+战斗结算画面、钥石去向 = 结算画面+营地,呈现归对应 UX spec 批次)
|
||||
return {
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user