Wowpedia
Advertisement

Font (inherits from FontInstance) is a font object assignable to any text-containing widget. Created with CreateFont(), <Font>, and <FontFamily>.

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.

Templates
FrameXML/Fonts.xml defines limited localization-dependent character sets, intended only for inheriting into other Fonts. {Fonts.xml at Townlong-YakFrameXML/Fonts.xml at GitHub}
SharedXML/SharedFontStyles.xml defines the traditional game fonts. {SharedFontStyles.xml at Townlong-YakSharedXML/SharedFontStyles.xml at GitHub}
FrameXML/FontStyles.xml defines additional fonts for certain use cases. {FontStyles.xml at Townlong-YakFrameXML/FontStyles.xml at GitHub}

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

References

Advertisement