CreateFont

From Warcraft Wiki
Jump to navigation Jump to search
Flavors
Links
Info
Added in 1.10.0 / 1.13.2

Creates a Font object.

fontObject = CreateFont(name)

Arguments

name
string - Globally-accessible name to be assigned for use as _G["name"]

Returns

fontObject
Font🔗 - Reference to the new font object.

Details

  • Font objects, similar to XML <Font> elements, may be used to create a common font pattern assigned to several widgets via FontInstance:SetFontObject(fontObject).
    • Subsequently changing the font object will affect the text displayed on every widget it was assigned to.
  • Since the new font object is created without any properties, it should be initialized via FontInstance:SetFont(path, height [, flags]) or Font:CopyFontObject(otherFont).