v0.13.8

FontString

widget type57 methodsavailable in: camelot

CreateFrame("FontString", …) makes one. It has every method of Region, plus 57 of its own.

Inherits from

  1. FontString · 57
  2. Region · 16
  3. ScriptRegion · 55
  4. ScriptRegionResizing · 13
  5. AnimatableObject · 3
  6. Object · 5
  7. FrameScriptObject · 21

The number is each type's own documented methods. A FontString has all of them.

Methods

In the emulator: 33 implemented, 24 guessed.

methodwhat it doesstatus
CalculateScreenAreaFromCharacterSpanReturns the screen rectangles a span of the font string's characters covers. · by wowlua
(leftIndex: number, rightIndex: number): uiBoundsRect[]?
guessed
CanNonSpaceWrapWhether the font string can wrap lines in the middle of a word. · by wowlua
(): boolean
guessed
CanWordWrapWhether the font string wraps long lines. · by wowlua
(): boolean
guessed
ClearAlphaGradientRemoves the font string's alpha gradient. · by wowlua
()
guessed
ClearTextSets text to an empty string and removes the Text secret aspect. · warcraft.wiki.gg ↗
()
implemented
FindCharacterIndexAtCoordinateReturns the index of the character at a point in the font string, and whether the point is on it. · by wowlua
(x: number, y: number): (number?, boolean?)
guessed
GetAlphaGradientReturns the font string's alpha gradient. · by wowlua
(): (number, number)
guessed
GetFieldSizeReturns the font string's field size. · by wowlua
(): number
guessed
GetFontReturns the basic font properties. · warcraft.wiki.gg ↗
(): (FontAsset?, number, TBFFlags)
implemented
GetFontHeightReturns the font string's font height. · by wowlua
(calculated: boolean): number
guessed
GetFontObjectReturns the font string's font object. · by wowlua
(): Font
guessed
GetIndentedWordWrapWhether wrapped lines in the font string are indented. · by wowlua
(): boolean
guessed
GetJustifyHReturns the font string's horizontal text alignment. · by wowlua
(): JustifyHorizontal
guessed
GetJustifyVReturns the font string's vertical text alignment. · by wowlua
(): JustifyVertical
guessed
GetLineHeightReturns the height of one line of the font string. · by wowlua
(): number
implemented
GetMaxLinesReturns the most lines the font string shows. · by wowlua
(): number
guessed
GetNumLinesReturns the number of lines the font string shows. · by wowlua
(): number
implemented
GetRotationReturns the font string's rotation in radians. · by wowlua
(): number
guessed
GetScaleAnimationModeReturns how the font string behaves when a scale animation plays on it. · by wowlua
(): FontStringScaleAnimationMode
guessed
GetShadowColorReturns the color of the font string's shadow as red, green, blue and alpha. · by wowlua
(): (number, number, number, number)
guessed
GetShadowOffsetReturns the offset of the font string's shadow. · by wowlua
(): (number, number)
guessed
GetSmoothScalingReturns whether the font string's text height scales smoothly instead of snapping to whole numbers. · by wowlua
(): boolean
guessed
GetSpacingReturns the spacing between the font string's lines. · by wowlua
(): number
guessed
GetStringHeightReturns how tall the string would be, in pixels, without wrapping: Height= MyFontString:GetStringHeight(); · warcraft.wiki.gg ↗
(): number
implemented
GetStringWidthFontString provides three methods to determine the width of its text independently from the value returned by Region:GetWidth: *GetStringWidth() ignores FontString:CanWordWrap but includes FontString:IsTruncated *GetUnboundedStringWidth() ignores word wrap and truncation *GetWrappedWidth() includes word wrap and truncation · warcraft.wiki.gg ↗
(): number
implemented
GetTextReturns the text from a FontString widget. · warcraft.wiki.gg ↗
(): string
implemented
GetTextColorReturns the font string's text color as red, green, blue and alpha. · by wowlua
(): (number?, number?, number?, number?)
guessed
GetTextScaleReturns the font string's text scale. · by wowlua
(): number
implemented
GetUnboundedStringWidthReturns the width the font string's text needs on one line, without wrapping. · by wowlua
(): number
implemented
GetUnboundedStringWidthForTextReturns the width some text would need on one line in the font string, without setting it. · by wowlua
(text: string): number
guessed
GetWrappedWidthReturns the width of the font string's text after it is wrapped. · by wowlua
(): number
guessed
IsTruncatedWhether the font string's text is cut off. · by wowlua
(): boolean
implemented
OnColorsUpdatedUpdates the font string after its colors changed. · by wowlua
()
guessed
SetAlphaGradientCreates or removes an alpha gradient over the text in the FontString fading from 100% opaque to 100% transparent. · warcraft.wiki.gg ↗
(start: number, length: number): boolean
guessed
SetDesaturateEmbeddedTexturesSets whether textures embedded in the font string's text are drawn without color. · by wowlua
(desaturate: boolean)
implemented
SetFixedColorSets whether the font string's color stays fixed. · by wowlua
(fixedColor: boolean)
implemented
SetFontSets the basic font properties. · warcraft.wiki.gg ↗
(fontFile: FontAsset, fontHeight: uiFontHeight, flags: TBFFlags?): boolean
implemented
SetFontHeightSets the font string's font height. · by wowlua
(height: number)
implemented
SetFontObjectSets the font string's font object. · by wowlua
(font: Font)
implemented
SetFormattedTextSets the text with format specifiers. · warcraft.wiki.gg ↗
(text: string)
implemented
SetIndentedWordWrapSets whether wrapped lines in the font string are indented. · by wowlua
(wrap: boolean)
implemented
SetJustifyHSets the font string's horizontal text alignment. · by wowlua
(justifyH: JustifyHorizontal)
implemented
SetJustifyVSets the font string's vertical text alignment. · by wowlua
(justifyV: JustifyVertical)
implemented
SetMaxLinesSets the most lines the font string shows. · by wowlua
(maxLines: number)
implemented
SetNonSpaceWrapSet whether long strings without spaces are wrapped or truncated. · warcraft.wiki.gg ↗
(wrap: boolean)
implemented
SetRotationSets the font string's rotation. · by wowlua
(radians: number)
implemented
SetScaleAnimationModeSets how the font string behaves when a scale animation plays on it. · by wowlua
(scaleAnimationMode: FontStringScaleAnimationMode)
implemented
SetShadowColorSets the color of the font string's shadow. · by wowlua
(colorR: number, colorG: number, colorB: number, a: number?)
implemented
SetShadowOffsetSets the offset of the font string's shadow. · by wowlua
(offsetX: number, offsetY: number)
implemented
SetSmoothScalingSets whether the font string's text height scales smoothly instead of snapping to whole numbers when the font string is scaled. · by wowlua
(smoothScaling: boolean)
implemented
SetSpacingSets the spacing between the font string's lines. · by wowlua
(spacing: number)
implemented
SetTextSets the text to be displayed in the FontString. · warcraft.wiki.gg ↗
(text: string)
implemented
SetTextColorSets the text color. · warcraft.wiki.gg ↗
(colorR: number, colorG: number, colorB: number, a: number?)
implemented
SetTextHeightSets the height of the font string's text by scaling it. · by wowlua
(height: number)
implemented
SetTextScaleSets the font string's text scale. · by wowlua
(textScale: number)
implemented
SetTextToFitChanges the text displayed by a fontstring and enables auto-calculation of width based upon the content. · warcraft.wiki.gg ↗
(text: string)
implemented
SetWordWrapSets whether the font string wraps long lines. · by wowlua
(wrap: boolean)
implemented

sources

Methods and inheritance: Blizzard's API documentation (Blizzard_APIDocumentationGenerated) (camelot 1.60.1). Descriptions: warcraft.wiki.gg's API pages, by its contributors, CC BY-SA 4.0 ↗; written by wowlua where no documentation describes the entry.