FontInstance is an abstract UI type that groups together the functionality of text-based frames, such as Buttons, MessageFrames, EditBoxes, SimpleHTML frames, and abstract Font objects. Methods are provided for setting text color and changing other aspects of font display like typeface, size, justification, shadow and spacing.
Defined Methods
- filename, fontHeight, flags = FontInstance:GetFont() - Returns the font instance's basic font properties
- font = FontInstance:GetFontObject() - Returns the `Font` object from which the font instance's properties are inherited
- justify = FontInstance:GetJustifyH() - Returns the font instance's horizontal text alignment style
- justify = FontInstance:GetJustifyV() - Returns the font instance's vertical text alignment style
- shadowR, shadowG, shadowB, shadowAlpha = FontInstance:GetShadowColor() - Returns the color of the font's text shadow
- xOffset, yOffset = FontInstance:GetShadowOffset() - Returns the offset of the font instance's text shadow from its text
- spacing = FontInstance:GetSpacing() - Returns the font instance's amount of spacing between lines
- textR, textG, textB, textAlpha = FontInstance:GetTextColor() - Returns the font instance's default text color
- isValid = FontInstance:SetFont("filename", fontHeight, "flags") - Sets the font instance's basic font properties
- FontInstance:SetFontObject(object) or FontInstance:SetFontObject("name") - Sets the `Font` object from which the font instance's properties are inherited
- FontInstance:SetJustifyH("justify") - Sets the font instance's horizontal text alignment style
- FontInstance:SetJustifyV("justify") - Sets the font instance's vertical text alignment style
- FontInstance:SetShadowColor(shadowR, shadowG, shadowB, shadowAlpha) - Sets the color of the font's text shadow
- FontInstance:SetShadowOffset(xOffset, yOffset) - Sets the offset of the font instance's text shadow from its text
- FontInstance:SetSpacing(spacing) - Sets the font instance's amount of spacing between lines
- FontInstance:SetTextColor(textR, textG, textB, textAlpha) - Sets the font instance's default text color
Inherited Methods
- name = FontInstance:GetName() - Returns the widget object's name
- type = FontInstance:GetObjectType() - Returns the object's widget type
- isType = FontInstance:IsObjectType("type") - Returns whether the object belongs to a given widget type