WoW:API FontInstance SetFont: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(replaced stub contents with the old contents of API FontString SetFont)
m (Move page script moved page API FontInstance SetFont to API FontInstance SetFont without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{widgetmethod}}
{{widgetmethod}}
The function is used to set the font to use for displaying text.


FontString:SetFont("font",size[,"flags"]) - Sets the font to use for display in the fontstring.
FontInstance:SetFont("font",size[,"flags"])


"font" is the name of a font
== Arguments ==
size is the size of the font
;font : String - path to the font file, relative to the WoW base directory.
"flags" are any of OUTLINE, THICKOUTLINE and/or MONOCHROME
;size : Number - size in points.
;flags : Optional String - any comma-delimited combination of "OUTLINE", "THICKOUTLINE" and "MONOCHROME".


Usage
FontString:SetFont("FRIZQT__.TTF",11,"OUTLINE, 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: ==  
== Notes: ==  
From Slouken, posted 2006-02-09
* 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)."
"...each font+font-size*fontstring-scale+flags combination generates a new instance of that font (along with associated textures and vertex data)."

Latest revision as of 04:45, 15 August 2023

Widget API ← FontInstance < SetFont

The function is used to set the font to use for displaying text.

FontInstance:SetFont("font",size[,"flags"])

Arguments[edit]

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[edit]

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:[edit]

  • 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)."