FontStrings are one of the two types of Region that is visible on the screen. It draws a block of text on the screen using the characteristics in an associated FontObject. You can change the text contents of it, set it to use a new FontObject, and set how it handles text that doesn't fit in its normal dimensions, such as how to wrap the text and whether to indent subsequent lines.
FontStrings are used widely through the UI, to display labels on controls, the names of units, keybindings on action buttons, health and mana values, and most other text data.
Defined Methods
- FontString:GetFieldSize() - This function is not yet documented
- FontString:GetIndentedWordWrap() - This function is not yet documented
- FontString:GetMaxLines() - This function is not yet documented
- FontString:GetNumLines() - This function is not yet documented
- FontString:GetWrappedWidth() - This function is not yet documented
- FontString:SetIndentedWordWrap() - This function is not yet documented
- FontString:SetMaxLines() - This function is not yet documented
- FontString:SetShown() - This function is not yet documented
- FontString:SetText("text") - Sets the text to be displayed in the font string
- FontString:SetTextHeight(height) - Scales the font string's rendered text to a different height
- FontString:SetWordWrap(enable) - Sets whether long lines of text in the font string can wrap onto subsequent lines
Inherited Methods
- FontString:IsForbidden() - This function is not yet documented
- isOver = FontString:IsMouseOver([topOffset [, leftOffset [, bottomOffset [, rightOffset]]]]) - Returns whether the mouse cursor is over the given region
- isType = FontString:IsObjectType("type") - Returns whether the object belongs to a given widget type
- isProtected, explicit = FontString:IsProtected() - Returns whether the region is protected
- shown = FontString:IsShown() - Returns whether the region is shown
- visible = FontString:IsVisible() - Returns whether the region is visible
- FontString:SetAllPoints([region]) or FontString:SetAllPoints(["name"]) - Sets all anchor points of the region to match those of another region
- FontString:SetAlpha(alpha) - Sets the opacity of the region relative to its parent
- FontString:SetDrawLayer("layer", sublayer) - Sets the layer at which the region's graphics are drawn relative to others in its frame
- isValid = FontString:SetFont("filename", fontHeight, "flags") - Sets the font instance's basic font properties
- FontString:SetFontObject(object) or FontString:SetFontObject("name") - Sets the `Font` object from which the font instance's properties are inherited
- FontString:SetHeight(height) - Sets the region's height
- FontString:SetJustifyH("justify") - Sets the font instance's horizontal text alignment style
- FontString:SetJustifyV("justify") - Sets the font instance's vertical text alignment style
- FontString:SetParent(frame) or FontString:SetParent("name") - Makes another frame the parent of this region
- FontString:SetPoint("point" [, relativeTo [, "relativePoint" [, xOffset [, yOffset]]]]) - Sets an anchor point for the region
- FontString:SetShadowColor(shadowR, shadowG, shadowB, shadowAlpha) - Sets the color of the font's text shadow
- FontString:SetShadowOffset(xOffset, yOffset) - Sets the offset of the font instance's text shadow from its text
- FontString:SetSize(width, height) - Sets the size of the region to the specified values
- FontString:SetSpacing(spacing) - Sets the font instance's amount of spacing between lines
- FontString:SetTextColor(textR, textG, textB, textAlpha) - Sets the font instance's default text color
- FontString:SetVertexColor(red, green, blue [, alpha]) - Sets a color shading for the region's graphics
- FontString:SetWidth(width) - Sets the region's width
- FontString:Show() - Shows the region
- FontString:StopAnimating() - Stops any active animations involving the region or its children