Fandom

WoWWiki

API FontInstance SetFont

104,631pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

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

Also on Fandom

Random Wiki