m
Move page script moved page API FontString SetText to WoW:API FontString SetText without leaving a redirect
(Link to UI_Escape_Sequences) |
m (Move page script moved page API FontString SetText to WoW:API FontString SetText without leaving a redirect) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 7: | Line 7: | ||
== Description == | == Description == | ||
Sets the text to be displayed in the fontstring. The text will have the color given to it via the fontinstance definition (or a FontString:SetTextColor call). You may however use [[UI_Escape_Sequences|escape sequences]] to modify the string's appearance. | Sets the text to be displayed in the fontstring. The text will have the color given to it via the fontinstance definition (or a [[API_FontString_SetTextColor|FontString:SetTextColor]] call). You may however use [[UI_Escape_Sequences|escape sequences]] to modify the string's appearance. | ||
NOTE: FontString has a limit of ~4000 chars. | NOTE: FontString has a limit of ~4000 chars. | ||
| Line 15: | Line 15: | ||
will return | will return | ||
<font style="color: black">This text is black, </font><font style="color: red">while this text will be red.</font> | <font style="color: black">This text is black, </font><font style="color: red">while this text will be red.</font> | ||
---- | |||
;''Notes'' | |||
* The ''Font'' must be set before calling this function. This is not done for you if the FontString is created via [[API Frame CreateFontString|Frame:CreateFontString]]. There are 3 ways to ensure the ''Font'' is set: | |||
** Send in an ''inheritsFrom'' value to [[API Frame CreateFontString|Frame:CreateFontString]]. | |||
** Set the ''inheritsFrom'' via [[API FontInstance SetFontObject|FontInstance:SetFontObject]]. | |||
** Set the font directly via [[API FontInstance SetFont|FontInstance:SetFont]]. | |||