WoW:API FontInstance SetFont: Difference between revisions

m
Move page script moved page API FontInstance SetFont to WoW:API FontInstance SetFont without leaving a redirect
({{widgetmethod}})
m (Move page script moved page API FontInstance SetFont to WoW:API FontInstance SetFont without leaving a redirect)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{widgetmethod}}
{{widgetmethod}}
{{stub/api}}
The function is used to set the font to use for displaying text.


Sets the font to use, returns 1 if the path was valid, nil otherwise (no change occurs)
FontInstance:SetFont("font",size[,"flags"])
<br>
 
<br>example: GameFontNormal:SetFont("Interface\\AddOns\\DiscordFrameModifier\\myriad.ttf",12)
== Arguments ==
;font : String - path to the font file, relative to the WoW base directory.
;size : Number - size in points.
;flags : Optional String - any comma-delimited combination of "OUTLINE", "THICKOUTLINE" and "MONOCHROME".
 
 
== Usage ==
This method applies to multiple widgets that are derived from FontInstance; for instance, SimpleHTML, EditBox and FontString widgets all have similar methods.
FontString:SetFont("Fonts\\FRIZQT__.TTF", 11, "OUTLINE, MONOCHROME")
 
== Notes: ==
* Slouken posted on 2006-02-09: "...each font+font-size*fontstring-scale+flags combination generates a new instance of that font (along with associated textures and vertex data)."
Anonymous user