XML UI ← XML elements < Font

Font is a special element that allows FontString properties to be more easily defined for inheriting. The Font element can be used in a XML/Ui element.

Inheritance Edit

Inherited by: FontString, Inherits: none, Defined in: Ui

Elements Edit

Attributes Edit

  • name (string)
  • inherits (string)
  • virtual (bool) - Default is 'false'.
  • font (string)
  • spacing (float) - Default is '0'.
  • outline (OUTLINE) - Default is 'NONE'.
  • monochrome (bool) - Default is 'false'.
  • justifyV (JUSTIFYV) - Default is 'MIDDLE'.
  • justifyH (JUSTIFYH) - Default is 'CENTER'.
  • height (int) - font height. is inline alternative to <FontHeight>

Summary Edit

Font is one of the few types that can be virtually inherited by more than one type. Fonts can inherit other Fonts and FontStrings can inherit Fonts. The primary purpose of Font is to avoid having to create virtual FontStrings which are expensive since they are fully renderable elements.

Example Edit

<Ui xmlns=""
  <Font name="MyFont" font="myfont.ttf" virtual="true">
      <AbsValue val="12"/>
  <Frame name="MyFrame">
    <Size x="200" y="200"/>
Layer definitions are only valid on pages of namespace "Layer"

This example creates a Font that is used by a FontString. Demonstrates using Font to simplify use of FontString.

Notes Edit

  • height attribute added 6.1.0

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.