09d4a60f43
Move every script and scene into role-based directories (actors/, systems/, ui/, levels/, props/) and all raw art under art/ (grouped by role, snake_case, Extract-Textures GLBs), dropping Blender version-suffix noise. Filenames are snake_case (PascalCase reserved for class_name) to avoid case-insensitive filesystem aliasing on the web/macOS targets. Routes the bull's hits through the typed DamageEvent pipeline and wires the bull's abilities to the Fx library. Updates CLAUDE.md's folder-layout overview to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CCyaJPTHCH9EDthpf4A5Sj
50 lines
1.5 KiB
GDScript
50 lines
1.5 KiB
GDScript
class_name UiFonts
|
|
extends RefCounted
|
|
## Shared thematic fonts for menus and HUD. Cinzel is a Roman monumental capital
|
|
## typeface — a deliberate nod to the "-osseum" (Colosseum) in Bullosseum.
|
|
##
|
|
## Fonts load via load_dynamic_font so they resolve identically in the editor,
|
|
## headless tests and exported builds, whether or not the .ttf has been imported.
|
|
|
|
const _DECORATIVE := "res://art/fonts/CinzelDecorative-Bold.ttf"
|
|
const _ROMAN := "res://art/fonts/Cinzel.ttf"
|
|
|
|
static var _title: FontFile = null
|
|
static var _body: FontFile = null
|
|
static var _body_bold: FontVariation = null
|
|
|
|
|
|
## Ornate display face — big banners, menu title, win/lose text.
|
|
static func title() -> FontFile:
|
|
if _title == null:
|
|
_title = _load(_DECORATIVE)
|
|
return _title
|
|
|
|
|
|
## Cleaner monumental face — buttons, labels, body copy.
|
|
static func body() -> FontFile:
|
|
if _body == null:
|
|
_body = _load(_ROMAN)
|
|
return _body
|
|
|
|
|
|
## Emboldened Roman face for small, high-legibility bits (keycaps, badges) where
|
|
## Cinzel's thin regular strokes wash out. Faked via FontVariation since only the
|
|
## regular weight ships, so no extra .ttf is needed.
|
|
static func body_bold() -> FontVariation:
|
|
if _body_bold == null:
|
|
_body_bold = FontVariation.new()
|
|
_body_bold.base_font = body()
|
|
_body_bold.variation_embolden = 0.5
|
|
return _body_bold
|
|
|
|
|
|
static func _load(path: String) -> FontFile:
|
|
if ResourceLoader.exists(path):
|
|
var res := load(path)
|
|
if res is FontFile:
|
|
return res as FontFile
|
|
var f := FontFile.new()
|
|
f.load_dynamic_font(path)
|
|
return f
|