wowpedia
Main Menu


FontString provides three methods to determine the width of its text independently from the value returned by Region:GetWidth:

         stringWidth = fontString:GetStringWidth()
unboundedStringWidth = fontString:GetUnboundedStringWidth()
        wrappedWidth = fontString:GetWrappedWidth()

Returns

stringWidth
Number - The minimum width necessary to contain the currently-displayed, possibly-truncated, text on a single line if WordWrap became forbidden; e.g. the width if word-wrapped lines were strung end-to-end
unboundedStringWidth
Number - The minimum width necessary to contain the entire text without truncation if WordWrap became forbidden; e.g. the width if ignoring any fixed anchor points or width
wrappedWidth
Number - The minimum width necessary to contain the currently-displayed text without changing its shape; e.g. the width of the widest line after applying word wrap and truncation

Notes

See also