Wowpedia
Advertisement

Changes the font for displaying text.

success = FontInstance:SetFont(font, size [, flags])

Arguments

font 
string - Path to the font file.
size 
number - Size in points.
flags 
string?Optional. Could be nil. - Any comma-delimited combination of "OUTLINE", "THICKOUTLINE" and "MONOCHROME".

Returns

success 
boolean? - True when the font was set, or nil when unable to load the appropriate file.

Details

  • Developer remarks from 2006 discuss the inner workings of SetFont: "...each font+font-size*fontstring-scale+flags combination generates a new instance of that font (along with associated textures and vertex data)."[1]
  • SetFont() overrides any subsequent calls to FontInstance:SetFontObject()

Example

fontString:SetFont("Fonts\\FRIZQT__.TTF", 11, "OUTLINE, MONOCHROME")

Patch changes

References

 
  1. ^ Blizzard Entertainment slouken 2006-02-09. Re: Upcoming 1.10 Changes - Concise List. Archived from the original. Post 317337 at 13:44 PST.
  2. ^ Ibid, post 317155 at 10:44 PST.
  3. ^ Iriel. Detailed API Changes 1.8.1 -> 0.9.0 (Dec 4). Archived from the original
Advertisement