Widget API: FontInstance:SetFontObject

From AddOn Studio
Revision as of 04:45, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API FontInstance SetFontObject to API FontInstance SetFontObject without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Widget API ← FontInstance < SetFontObject

Inherits all font attributes from another font.

MyFont:SetFontObject(fontObject) 

Parameters[edit]

Arguments[edit]

fontObject
A reference to a font object, a name of a font object, or nil

Example[edit]

MyFont:SetFontObject(GameTooltipTextSmall)
MyFont:SetFontObject("GameTooltipTextSmall")

Notes:[edit]

Many font objects are predefined in Fonts.xml. Anything from which one can inherit a <FontString> is a font object.

Some of the font objects in the game:

  • GameFontNormal
  • GameFontNormalSmall
  • GameFontNormalLarge
  • GameFontHighlight
  • GameFontHighlightSmall
  • GameFontHighlightSmallOutline
  • GameFontHighlightLarge
  • GameFontDisable
  • GameFontDisableSmall
  • GameFontDisableLarge
  • GameFontGreen
  • GameFontGreenSmall
  • GameFontGreenLarge
  • GameFontRed
  • GameFontRedSmall
  • GameFontRedLarge
  • GameFontWhite
  • GameFontDarkGraySmall
  • NumberFontNormalYellow
  • NumberFontNormalSmallGray
  • QuestFontNormalSmall
  • DialogButtonHighlightText
  • ErrorFont
  • TextStatusBarText
  • CombatLogFont