Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Advertisement

<FontString> (inherits from <LayoutFrame>, creates a FontString) draws text.

<FontString font="" bytes="" text="" spacing="" outline="" monochrome="" nonspacewrap="" wordwrap="" justifyV="" justifyH="" maxLines="" indented="">
	<FontHeight />
	<Color />
	<Shadow />
</FontString>

Attributes[]

font (xs:string?Optional. Could be nil.)
bytes (xs:int?Optional. Could be nil.) - Defaults to 255.
text (xs:string?Optional. Could be nil.)
spacing (xs:float?Optional. Could be nil.)
outline (ui:OUTLINETYPE) - "NORMAL", "THICK".
monochrome (xs:boolean?Optional. Could be nil.)
nonspacewrap (xs:boolean?Optional. Could be nil.)
wordwrap (xs:boolean?Optional. Could be nil.)
justifyV (ui:JUSTIFYVTYPE) - "TOP", "MIDDLE", "BOTTOM".
justifyH (ui:JUSTIFYHTYPE) - "LEFT", "RIGHT", "CENTER".
maxLines (xs:unsignedInt?Optional. Could be nil.)
indented (xs:boolean?Optional. Could be nil.)
alpha (xs:float?Optional. Could be nil.) - Sets the alpha.
ignoreParentAlpha (xs:boolean?Optional. Could be nil.) - Controls alpha directly or as a fraction of its parent's alpha.
ignoreParentScale (xs:boolean?Optional. Could be nil.) - Prevents resizing due to the parent frame's scale.

Child elements[]

<FontHeight> sets the font height.

val (xs:float) - Sets the font height, scaling dependent.

<Color> sets color using RGB values or a ColorMixin, and alpha.

r (xs:float?Optional. Could be nil.) - Red component from 0.0 (default) to 1.0.
g (xs:float?Optional. Could be nil.) - Green component from 0.0 (default) to 1.0.
b (xs:float?Optional. Could be nil.) - Blue component from 0.0 (default) to 1.0.
a (xs:float?Optional. Could be nil.) - Alpha (opacity) from 0.0 to 1.0 (default).
name (xs:string?Optional. Could be nil.) - Name of a ColorMixin made with CreateColor().

<Shadow> places a shadow behind text with a <Color> child tag.

x (xs:float) - Left (+) or right (-), scaling dependent.
y (xs:float) - Up (+) or down (-), scaling dependent.

Details[]

  • May inherit a <Font> to take on its properties.
  • Similar to a <Texture>, normally belongs inside <Frame> within its <Layers> and <Layer> child elements.

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" x="20" y="-20" />
  </Anchors>
  <Shadow>
    <Offset x="1" y="1" />
    <Color r="0" g="0" b="0"/>
  </Shadow>
</FontString>
Advertisement