Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Register
m (Edit link and template:api)
Tag: WoW API docs
m (Updating Elinks text)
Tag: WoW API docs
Line 29: Line 29:
   
 
== External links ==
 
== External links ==
<!-- Please read https://wow.gamepedia.com/Wowpedia:External_links_policy before adding new links. -->
+
<!-- Please read https://wowpedia.fandom.com/Wowpedia:External_links_policy before adding new links. -->
 
{{Elinks-api|nogit=|wowprog=http://wowprogramming.com/docs/widgets/Font.html}}
 
{{Elinks-api|nogit=|wowprog=http://wowprogramming.com/docs/widgets/Font.html}}
   

Revision as of 19:01, 20 November 2021

Font (inherits from FontInstance)

The Font object is the only type of object that is not attached to a parent widget; indeed, its purpose is to be shared between other objects that share font characteristics. In this way, changes to the Font object will update the text appearance of all text objects that have it set as their Font using FontInstance:SetFontObject(). This allows a coder to maintain a consistent appearance between UI elements, as well as simplifying the resources and work required to update multiple text-based UI elements.

Construction

In Lua
  • CreateFont(name) - Creates a new font object with a globally accessible name.
In XML
  • <Font> - Defines a font object.
  • <FontFamily> - Defines a localization-dependent font object (compatibility for different character sets).
Templates

Defined Methods

Font:CopyFontObject(otherFont) - Set this Font's attributes to be a copy of the otherFont font object's.
Font:GetAlpha()
Font:SetAlpha(alpha)

Patch changes

External links

References