Files
benilla-octo/crates/benilla/assets/ui/Fonts.xml
T
SamandClaude Fable 5 2ad0043523 benilla: initial public release
A from-scratch World of Warcraft 1.12.1 client in Rust + Bevy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 14:27:01 +07:00

291 lines
14 KiB
XML

<Ui xmlns="http://www.blizzard.com/wow/ui/">
<!--
Benilla's named virtual Font objects: the COMPLETE set from the real 1.12.1 FrameXML
`Fonts.xml`, transcribed verbatim — names, TTF paths, heights, colors, outlines, and
(critically) which families carry a `<Shadow>` and which don't. The reference copy is
re-extractable from the client at any time with the `mpqx` bin (crates/benilla-mpq,
virtual path `Interface\FrameXML\Fonts.xml`); this is our own authored file (MIT/Apache),
only the TTFs themselves stream from the client at render.
Being COMPLETE is the point: the first partial transcription lacked `QuestFontNormalSmall`,
a window substituted `GameFontNormalSmall` for it, and the parchment objectives rendered
10px gold WITH the MasterFont drop shadow instead of 12px warm-brown WITHOUT one — a look
bug born entirely from a missing font object, invisible to every engine test. Substituting
"a similar font" is never safe (shadow/height/color all ride the name), so every name the
real FrameXML defines exists here.
A FontString picks a font object up with `inherits="GameFontNormal"`; `SetFontObject`
re-points it. Each object resolves {font path, height, color, outline, shadow} through its
`inherits` chain. NOTE the load-bearing asymmetry, straight from the ref: the `GameFont*`
families chain through `MasterFont` (whose only content is the (1,-1) black `<Shadow>`),
while `GameFontBlack`/`GameFontWhite`, the `NumberFont*` family (outlined instead), and the
parchment `QuestFont*` family (except the brown-shadowed `QuestTitleFont`) do NOT — dark
text on parchment is shadowless in the real client.
-->
<!-- The shared font-color globals, QUOTED from the real Fonts.xml's own <Script> block
(ref l.8-19) — the |cAARRGGBB escape prefixes the stat/tooltip builders concatenate, and
the two color tables tooltip AddLine calls read. Defined here (the ref's own home, loaded
first) so every window shares one verified set. -->
<Script><![CDATA[
NORMAL_FONT_COLOR_CODE = "|cffffd200" -- ref Fonts.xml l.8
HIGHLIGHT_FONT_COLOR_CODE = "|cffffffff" -- l.9
RED_FONT_COLOR_CODE = "|cffff2020" -- l.10
GREEN_FONT_COLOR_CODE = "|cff20ff20" -- l.11
GRAY_FONT_COLOR_CODE = "|cff808080" -- l.12
FONT_COLOR_CODE_CLOSE = "|r" -- l.14
NORMAL_FONT_COLOR = { r = 1.0, g = 0.82, b = 0 } -- l.15
HIGHLIGHT_FONT_COLOR = { r = 1.0, g = 1.0, b = 1.0 } -- l.16
GRAY_FONT_COLOR = { r = 0.5, g = 0.5, b = 0.5 } -- l.17
GREEN_FONT_COLOR = { r = 0.1, g = 1.0, b = 0.1 } -- l.18
RED_FONT_COLOR = { r = 1.0, g = 0.1, b = 0.1 } -- l.19
-- Added this session (decision 0216 §8, the spellbook slice) — the ref's own l.20, the
-- one color this file was missing: a passive spell's name text (SpellBookFrame.lua:385).
PASSIVE_SPELL_FONT_COLOR = { r = 0.77, g = 0.64, b = 0 } -- l.20
-- The 1.12 item-quality palette (ref Constants.lua's ITEM_QUALITY_COLORS, the real
-- global name) — promoted here on its second customer (the unit popup's loot-threshold
-- rows; LootFrame.xml aliases its old private copy to this). Indexed 0..6; values match
-- GetItemQualityColor and ui_items.rs's quality_color.
ITEM_QUALITY_COLORS = {
[0] = { r = 0.62, g = 0.62, b = 0.62 }, -- Poor (gray)
[1] = { r = 1.00, g = 1.00, b = 1.00 }, -- Common (white)
[2] = { r = 0.12, g = 1.00, b = 0.00 }, -- Uncommon (green)
[3] = { r = 0.00, g = 0.44, b = 0.87 }, -- Rare (blue)
[4] = { r = 0.64, g = 0.21, b = 0.93 }, -- Epic (purple)
[5] = { r = 1.00, g = 0.50, b = 0.00 }, -- Legendary (orange)
[6] = { r = 0.90, g = 0.80, b = 0.50 }, -- Artifact (light gold)
}
]]></Script>
<!-- MasterFont: the shadow-only root the GameFont* families chain through (ref l.56). -->
<Font name="MasterFont" virtual="true">
<Shadow>
<Offset><AbsDimension x="1" y="-1"/></Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
<!-- SystemFont: FRIZQT, 15px, yellow (ref l.64). -->
<Font name="SystemFont" inherits="MasterFont" font="Fonts\FRIZQT__.TTF" virtual="true">
<FontHeight><AbsValue val="15"/></FontHeight>
<Color r="1.0" g="1.0" b="0"/>
</Font>
<!-- The GameFont body family: FRIZQT, 12px, gold; color variants override only <Color> (ref l.70-96). -->
<Font name="GameFontNormal" inherits="MasterFont" font="Fonts\FRIZQT__.TTF" virtual="true">
<FontHeight><AbsValue val="12"/></FontHeight>
<Color r="1.0" g="0.82" b="0"/>
</Font>
<Font name="GameFontHighlight" inherits="GameFontNormal" virtual="true">
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<Font name="GameFontDisable" inherits="GameFontNormal" virtual="true">
<Color r="0.5" g="0.5" b="0.5"/>
</Font>
<Font name="GameFontGreen" inherits="GameFontNormal" virtual="true">
<Color r="0.1" g="1.0" b="0.1"/>
</Font>
<Font name="GameFontRed" inherits="GameFontNormal" virtual="true">
<Color r="1.0" g="0.1" b="0.1"/>
</Font>
<!-- GameFontBlack/White: 12px FRIZQT with NO MasterFont chain — shadowless (ref l.88-96). -->
<Font name="GameFontBlack" font="Fonts\FRIZQT__.TTF" virtual="true">
<FontHeight><AbsValue val="12"/></FontHeight>
<Color r="0" g="0" b="0"/>
</Font>
<Font name="GameFontWhite" inherits="GameFontBlack" virtual="true">
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<!-- The GameFont Small family: FRIZQT, 10px, gold (ref l.97-125). -->
<Font name="GameFontNormalSmall" inherits="MasterFont" font="Fonts\FRIZQT__.TTF" virtual="true">
<FontHeight><AbsValue val="10"/></FontHeight>
<Color r="1.0" g="0.82" b="0"/>
</Font>
<Font name="GameFontHighlightSmall" inherits="GameFontNormalSmall" virtual="true">
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<Font name="GameFontDisableSmall" inherits="GameFontNormalSmall" virtual="true">
<Color r="0.5" g="0.5" b="0.5"/>
</Font>
<Font name="GameFontDarkGraySmall" inherits="GameFontNormalSmall" virtual="true">
<Color r="0.35" g="0.35" b="0.35"/>
</Font>
<Font name="GameFontGreenSmall" inherits="GameFontNormalSmall" virtual="true">
<Color r="0.1" g="1.0" b="0.1"/>
</Font>
<Font name="GameFontRedSmall" inherits="GameFontNormalSmall" virtual="true">
<Color r="1.0" g="0.1" b="0.1"/>
</Font>
<!-- Despite the name, the ref declares a SHADOW here, not an outline (ref l.119). -->
<Font name="GameFontHighlightSmallOutline" inherits="GameFontHighlightSmall" virtual="true">
<Shadow>
<Offset><AbsDimension x="1" y="-1"/></Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
<!-- The GameFont Large family: FRIZQT, 16px, gold (ref l.127-145). -->
<Font name="GameFontNormalLarge" inherits="MasterFont" font="Fonts\FRIZQT__.TTF" virtual="true">
<FontHeight><AbsValue val="16"/></FontHeight>
<Color r="1.0" g="0.82" b="0"/>
</Font>
<Font name="GameFontHighlightLarge" inherits="GameFontNormalLarge" virtual="true">
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<Font name="GameFontDisableLarge" inherits="GameFontNormalLarge" virtual="true">
<Color r="0.5" g="0.5" b="0.5"/>
</Font>
<Font name="GameFontGreenLarge" inherits="GameFontNormalLarge" virtual="true">
<Color r="0.1" g="1.0" b="0.1"/>
</Font>
<Font name="GameFontRedLarge" inherits="GameFontNormalLarge" virtual="true">
<Color r="1.0" g="0.1" b="0.1"/>
</Font>
<!-- FRIZQT, 20px, gold (ref l.145). -->
<Font name="GameFontNormalHuge" inherits="MasterFont" font="Fonts\FRIZQT__.TTF" virtual="true">
<FontHeight><AbsValue val="20"/></FontHeight>
<Color r="1.0" g="0.82" b="0"/>
</Font>
<!-- The Number family: ARIALN, outlined, white — NO shadow (ref l.150-179). -->
<Font name="NumberFontNormal" font="Fonts\ARIALN.TTF" outline="NORMAL" virtual="true">
<FontHeight><AbsValue val="14"/></FontHeight>
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<Font name="NumberFontNormalYellow" inherits="NumberFontNormal" virtual="true">
<Color r="1.0" g="0.82" b="0"/>
</Font>
<Font name="NumberFontNormalSmall" font="Fonts\ARIALN.TTF" outline="THICK" virtual="true" monochrome="true">
<FontHeight><AbsValue val="12"/></FontHeight>
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<Font name="NumberFontNormalSmallGray" inherits="NumberFontNormalSmall" outline="THICK" virtual="true">
<Color r="0.6" g="0.6" b="0.6"/>
</Font>
<Font name="NumberFontNormalLarge" font="Fonts\ARIALN.TTF" outline="NORMAL" virtual="true">
<FontHeight><AbsValue val="16"/></FontHeight>
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<Font name="NumberFontNormalHuge" font="Fonts\skurri.ttf" outline="THICK" virtual="true">
<FontHeight><AbsValue val="30"/></FontHeight>
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<!-- ChatFontNormal: ARIALN, 14px, white, (1,-1) black shadow (ref l.180). -->
<Font name="ChatFontNormal" font="Fonts\ARIALN.TTF" virtual="true">
<FontHeight><AbsValue val="14"/></FontHeight>
<Color r="1.0" g="1.0" b="1.0"/>
<Shadow>
<Offset><AbsDimension x="1" y="-1"/></Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
</Font>
<!-- The quest/parchment fonts (ref l.191-215): MORPHEUS 18 title with a warm-brown (0.49,0.35,0.05)
shadow; the FRIZQT body fonts are dark-on-parchment and SHADOWLESS (QuestFontNormalSmall
chains through GameFontBlack, not MasterFont). -->
<Font name="QuestTitleFont" font="Fonts\MORPHEUS.ttf" virtual="true">
<FontHeight><AbsValue val="18"/></FontHeight>
<Color r="0" g="0" b="0"/>
<Shadow>
<Offset><AbsDimension x="1" y="-1"/></Offset>
<Color r="0.49" g="0.35" b="0.05"/>
</Shadow>
</Font>
<Font name="QuestFont" font="Fonts\FRIZQT__.TTF" virtual="true">
<FontHeight><AbsValue val="13"/></FontHeight>
<Color r="0" g="0" b="0"/>
</Font>
<Font name="QuestFontNormalSmall" inherits="GameFontBlack" virtual="true">
<Color r="0.30" g="0.18" b="0"/>
</Font>
<Font name="QuestFontHighlight" font="Fonts\FRIZQT__.TTF" virtual="true">
<FontHeight><AbsValue val="14"/></FontHeight>
<Color r="0" g="0" b="0"/>
</Font>
<!-- The MORPHEUS 15px book/mail body fonts (ref l.216-229). -->
<Font name="ItemTextFontNormal" font="Fonts\MORPHEUS.TTF" justifyH="LEFT" virtual="true">
<FontHeight><AbsValue val="15"/></FontHeight>
<Color r="0.18" g="0.12" b="0.06"/>
</Font>
<Font name="MailTextFontNormal" font="Fonts\MORPHEUS.TTF" justifyH="LEFT" virtual="true">
<FontHeight><AbsValue val="15"/></FontHeight>
<Color r="0.18" g="0.12" b="0.06"/>
</Font>
<!-- SubSpellFont: FRIZQT 10, dark brown (ref l.231). -->
<Font name="SubSpellFont" font="Fonts\FRIZQT__.TTF" virtual="true">
<FontHeight><AbsValue val="10"/></FontHeight>
<Color r="0.35" g="0.2" b="0"/>
</Font>
<!-- The dialog (StaticPopup) button pair: FRIZQT 16 (ref l.237-245). -->
<Font name="DialogButtonNormalText" font="Fonts\FRIZQT__.TTF" virtual="true">
<FontHeight><AbsValue val="16"/></FontHeight>
<Color r="1.0" g="0.82" b="0.0"/>
</Font>
<Font name="DialogButtonHighlightText" inherits="DialogButtonNormalText" virtual="true">
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<!-- The zone-announce banners: THICK-outlined FRIZQT; the ref's bare `<Shadow/>` transcribed
as-is (offset defaults, i.e. no visible offset) (ref l.246-257). -->
<Font name="ZoneTextFont" font="Fonts\FRIZQT__.TTF" outline="THICK" virtual="true">
<FontHeight><AbsValue val="102"/></FontHeight>
<Color r="1.0" g="0.9294" b="0.7607"/>
<Shadow/>
</Font>
<Font name="SubZoneTextFont" font="Fonts\FRIZQT__.TTF" outline="THICK" virtual="true">
<FontHeight><AbsValue val="26"/></FontHeight>
</Font>
<Font name="ErrorFont" inherits="GameFontNormalLarge" virtual="true"/>
<Font name="TextStatusBarText" inherits="NumberFontNormal" virtual="true"/>
<Font name="TextStatusBarTextSmall" font="Fonts\ARIALN.TTF" outline="NORMAL" virtual="true" monochrome="false">
<FontHeight><AbsValue val="12"/></FontHeight>
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<Font name="CombatLogFont" inherits="GameFontHighlight" justifyH="LEFT" virtual="true"/>
<!-- The tooltip family: FRIZQT white, no shadow (ref l.267-285). -->
<Font name="GameTooltipText" font="Fonts\FRIZQT__.TTF" justifyH="LEFT" virtual="true">
<FontHeight><AbsValue val="12"/></FontHeight>
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<Font name="GameTooltipTextSmall" font="Fonts\FRIZQT__.TTF" justifyH="LEFT" virtual="true">
<FontHeight><AbsValue val="10"/></FontHeight>
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<Font name="GameTooltipHeaderText" font="Fonts\FRIZQT__.TTF" justifyH="LEFT" virtual="true">
<FontHeight><AbsValue val="14"/></FontHeight>
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<Font name="WorldMapTextFont" font="Fonts\FRIZQT__.TTF" outline="THICK" virtual="true">
<FontHeight><AbsValue val="102"/></FontHeight>
<Color r="1.0" g="0.9294" b="0.7607"/>
<Shadow/>
</Font>
<!-- The invoice (auction mail) parchment fonts (ref l.293-304). -->
<Font name="InvoiceTextFontNormal" font="Fonts\FRIZQT__.TTF" justifyH="LEFT" virtual="true">
<FontHeight><AbsValue val="12"/></FontHeight>
<Color r="0.18" g="0.12" b="0.06"/>
</Font>
<Font name="InvoiceTextFontSmall" font="Fonts\FRIZQT__.TTF" justifyH="LEFT" virtual="true">
<FontHeight><AbsValue val="10"/></FontHeight>
<Color r="0.18" g="0.12" b="0.06"/>
</Font>
<!-- CombatTextFont: FRIZQT 25, gold, MasterFont shadow (ref l.305). -->
<Font name="CombatTextFont" inherits="MasterFont" font="Fonts\FRIZQT__.TTF" virtual="true">
<FontHeight><AbsValue val="25"/></FontHeight>
<Color r="1.0" g="0.82" b="0"/>
</Font>
</Ui>