Font

From TrillWiki

Jump to: navigation, search

[edit] To Define a Font

Fonts are used for topic controls, list controls, etc.

This code is used in the main <trillian> level. (i.e. where you've defined your <bitmap>s) Many skinners use a files.xml to define bitmaps / fonts / sounds.

<font name="name" file="path and filename" />
Attribute Priority Description, Possible Values
name Required Arbitrary name which you will use to reference this font in the rest of your code
file Required The path and filename. This is in relation to the trillian.xml file (not the current file)

(Path is required only if you're using a custom font with the skin that isn't installed in the system's fonts.)


[edit] To Specify a Font for a Control

This code is used inside controls to use the font defined above

<control>
	<font source="name" type="" name="" size="" bold="" italics="" underline=""/>
</control>
Attribute Priority Description, Possible Values
source Required The name defined above
type Optional Common Name for the font i.e. "MS Sans Serif"
name Required Depends on the control it's used in, but this defines what the font is used for. i.e. group / default, etc
size Optional Font size in points
bold Optional 0=normal, 1=bold
italics Optional 0=normal, 1=italic
underline Optional 0=normal, 1=underlined

Note: bold/italics/underline are 0 by default, so you can leave them off if not needed.

Also, you can use "fontfile" as the font name to use the users chosen font from Trillian's preferences.

[edit] References