<Font> (creates a Font object) defines a font for text-containing elements like <FontString> and <EditBox>.

<Font name="" inherits="" virtual="" font="" spacing="" outline="" monochrome="" justifyV="" justifyH="" height="" fixedSize="" filter="">
	<FontHeight />
	<Color />
	<Shadow />


name (xs:string?Optional. Could be nil.) - Similar to <LayoutFrame>; normally required but may be omitted inside a <FontFamily>
inherits (xs:string?Optional. Could be nil.) - Similar to <LayoutFrame>.
virtual (xs:boolean?Optional. Could be nil.) - Similar to <LayoutFrame>.
font (xs:string?Optional. Could be nil.)
spacing (xs:float?Optional. Could be nil.)
outline (ui:OUTLINETYPE ?) - "NONE" (default), "NORMAL", "THICK"
monochrome (xs:boolean?Optional. Could be nil.)
justifyV (ui:JUSTIFYVTYPE ?) - "TOP", "BOTTOM", "MIDDLE" (default)
justifyH (ui:JUSTIFYVTYPE ?) - "LEFT", "RIGHT", "CENTER" (default)
height (xs:float?Optional. Could be nil.)
fixedSize (xs:boolean?Optional. Could be nil.)
filter (xs:boolean?Optional. Could be nil.)

Child elements

<FontHeight> sets the font height.

val (xs:float) - Sets the font height, scaling dependent.

<Color> sets color using RGB values or a ColorMixin, and alpha.

r (xs:float?Optional. Could be nil.) - Red component from 0.0 (default) to 1.0.
g (xs:float?Optional. Could be nil.) - Green component from 0.0 (default) to 1.0.
b (xs:float?Optional. Could be nil.) - Blue component from 0.0 (default) to 1.0.
a (xs:float?Optional. Could be nil.) - Alpha (opacity) from 0.0 to 1.0 (default).
name (xs:string?Optional. Could be nil.) - Name of a ColorMixin made with CreateColor().

<Shadow> places a shadow behind text with a <Color> child tag.

x (xs:float) - Left (+) or right (-), scaling dependent.
y (xs:float) - Up (+) or down (-), scaling dependent.



Using a Virtual XML template:

<Font name="MyFontTemplate" virtual="true">
	<FontHeight val="12">
	<Color name="WHITE_FONT_COLOR" />
<FontString inherits="MyFontTemplate" text="Foo" />

Using a concrete Font:

<Font name="MyFont">
	<FontHeight val="12">
	<Color name="WHITE_FONT_COLOR" />
<FontString font="MyFont" text="Bar" />

Patch changes

See also


  1. ^ 2016-07-19, UI.xsd, version, near line 353, archived at Townlong-Yak
  2. ^ 2015-02-26, UI.xsd, version, near line 346, archived at Townlong-Yak
  3. ^ Iriel 2005-12-28. Upcoming 1.10 Changes - Concise List. Archived from the original
  4. ^ 2006-05-02, UI.xsd, version, near line 223, archived at Townlong-Yak