WoW:API FontString SetText: Difference between revisions

Updated with new information
(Link to UI_Escape_Sequences)
(Updated with new information)
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]].
Anonymous user