FontInstance (inherits from UIObject) is an abstract UI type that groups together the functionality of text-based frames.

Defined Methods

Methods are provided for setting text color and changing other aspects of font display like typeface, size, justification, shadow and spacing.

FontInstance:GetFont() - Return the font path, height, and flags that may be used to construct an identical Font object.
FontInstance:GetFontObject() - Return the "parent" Font object, or nil if none.
FontInstance:SetFont(path, height[,flags]) - Constructs a new Font object and assigns it to this FontInstance.
FontInstance:SetFontObject(fontObject) - Sets the "parent" Font object from which this object inherits properties.
FontInstance:GetIndentedWordWrap() - Returns the indentation when text wraps beyond the first line
FontInstance:GetJustifyH() - Returns the horizontal text justification.
FontInstance:GetJustifyV() - Returns the vertical text justification.
FontInstance:GetSpacing() - Returns the line spacing.
FontInstance:SetIndentedWordWrap() - Defines the indentation when text wraps beyond the first line
FontInstance:SetJustifyH(justifyH) - Defines the horizontal text justification ("LEFT","RIGHT", or "CENTER")
FontInstance:SetJustifyV(justifyV) - Defines the vertical text justification ("TOP", "BOTTOM", or "MIDDLE")
FontInstance:SetSpacing(spacing) - Sets the spacing between lines of text in the object.
FontInstance:GetShadowColor() - Returns the color of text shadow.
FontInstance:GetShadowOffset() - Returns the text shadow offset.
FontInstance:GetTextColor() - Returns the default text color.
FontInstance:SetShadowColor(r, g, b[, a]) - Sets the text shadow color.
FontInstance:SetShadowOffset(x, y) - Sets the text shadow offset.
FontInstance:SetTextColor(r, g, b[, a]) - Sets the default text color.

Patch changes

  • WoW Icon update.png Patch 1.10.0 / API (2006-03-28): Implemented by the new concrete type Font.[1]
  • WoW Icon update.png Patch 1.9.0 / API (2006-01-03): Added as GetFont() and SetFont() implemented on several types.[2]
    Previously only FontString:SetFont()

See also

External links