From Wowpedia
Jump to: navigation, search

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

shortcut iconSee FrameXML/Fonts.xml for the system default list of inheritable fonts!

Code: FontString Widget API


<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"/>
   <Anchor point="TOPLEFT" relativeTo="$parent" x="20" y="-20" />
    <Offset x="1" y="1" />
    <Color r="0" g="0" b="0"/>