WoW:XML/FontString
Derived from: LayoutFrame
Elements: FontHeight, Color, Shadow
Attributes: font, bytes, text, spacing, outline, monochrome, nonspacewrap, justifyV, justifyH, maxLines, inherits
The Fontstring element is used to display a text in the user interface. The text displayed by the Fontstring element can be changed with the LUA function <fontstringobject>:SetText() or read with the function <fontstringobject>:GetText().
outline = "NORMAL" or "THICK", monochrome = "true" or "false", justifyV = "TOP", "MIDDLE" or "BOTTOM", justifyH = "LEFT", "RIGHT", "CENTER"
inherits can be set to an existing font. If set, the current FontString will take on all of that font's settings, unless overridden in the current FontString.
Note: <FontString> must be within a <Layer>, Attribute "font" needs to be set for element "FontHeight" to work
- Template:Icon-shortcutSee [DEPRECATED http://wowprogramming.com/utils/xmlbrowser/live/FrameXML/Fonts.xml FrameXML/Fonts.xml] for the system default list of inheritable fonts!
Code: FontString Widget API
Example
<FontString name="$parentFontString" font="Fonts\FRIZQT__.TTF" text="Example Text" justifyH="LEFT" justifyV="TOP"> <Color r="1" g="0.8" b="1" a="1"/> <FontHeight val="12"/> <Anchors> <Anchor point="TOPLEFT" relativeTo="$parent"> <Offset> <AbsDimension x="20" y="-20"/> </Offset> </Anchor> </Anchors> <Shadow> <offset> <AbsDimension x="1" y="1"/> </offset> <color r="0" g="0" b="0"/> </Shadow> </FontString>