clan::Font can be constructed from a resource file.
Using the <font> element
The font element must contain either the <sprite> or <ttf> element
-
Attribute: name
Resource identifier to use as base for this font. This is specified in the font family name of clan::FontFamily
Default value: None, MUST BE PRESENT.
-
Element: <sprite>
Describes a sprite font
-
Element: <ttf>
Describes a system font
Using the <sprite> element
-
Attribute: glyphs
The sprite description containing the glyphs. See Sprite Resources
Default value: None, MUST BE PRESENT.
-
Attribute: letters
The glyphs contained in /<glyphs>
Default value: None, MUST BE PRESENT.
-
Attribute: monospace (Optional)
If "true", then all letters have equal width
-
Attribute: spacelen (Optional)
The width of unknown glyphs. If unset, this defaults to the average of the font glyphs. If monospace is used, then this always equals the widest glyph
-
Attribute: height (Optional)
floating point value
-
Attribute: ascent (Optional)
floating point value
-
Attribute: descent (Optional)
floating point value
-
Attribute: internal_leading (Optional)
floating point value
-
Attribute: external_leading (Optional)
floating point value
-
Attribute: average_character_width (Optional)
floating point value
-
Attribute: max_character_width (Optional)
floating point value
-
Attribute: weight (Optional)
floating point value
-
Attribute: overhang (Optional)
floating point value
-
Attribute: digitized_aspect_x (Optional)
floating point value
-
Attribute: digitized_aspect_y (Optional)
floating point value
-
Attribute: italic (Optional)
true or false
-
Attribute: underlined (Optional)
true or false
-
Attribute: struck_out (Optional)
true or false
-
Attribute: fixed_pitch (Optional)
true or false
Using the <ttf> element
-
Attribute: file (Optional)
Use this filename that contains the font.
-
Attribute: typeface
Use this to change the typeface name of the font. i.e. The typeface name inside the font file.
Default value: None, MUST BE PRESENT.
-
Attribute: height (Optional)
floating point value
-
Attribute: average_width (Optional)
floating point value
-
Attribute: anti_alias
true or false
-
Attribute: subpixel
true or false