Cdml Font

From: AdvancedTextFormatting, CdmlElements


This CmdlElement can be used to change the font or size of the displayed text or to create colored text.


The following line:

This word is RED.

results from the source-line:

: This word is [[font][color=red]RED].


  • color: allows to specify a color out of the 16 millions of colors available (default: black); e.g. [color=green] or [color=#ffaacc] (c.f. HtmlColorCodes, CdmlColorNames)
  • size: allows to specify the font-size. This can be either an "absolute" (1-7) or a "relative" font size. (default: 3); e.g. [size=5] or [size=-2].
Note: In each browser a standard-size is defined. Relative font-sizes are chosen according to this standard-size, therefore selecting a small size can lead to lines which may no longer be readable on other computers!

  • face: allows specifying the font-face (e.g. Arial, Times, Courier, Verdana). It is also possible to specify more than one font-face, in this case the browser uses the first one, which is actually available on the computer. (e.g. [face=Verdana,Arial,Helvetica].
Note: Not each computer has every font installed!

More Examples

The following lines:

This sentence is in color #00aa33.

This sentence has size 0.
This sentence has size 1.
This sentence has size 2.
This sentence has size 3.
This sentence has size 4.
This sentence has size 5.
This sentence has size 6.
This sentence has size 7.
This sentence has size 8.

This is a sentence in Courier.

are created from:

: [[font][color=#00aa33]This sentence is in color #00aa33].

: [[font][size=0]This sentence has size  0].
: [[font][size=1]This sentence has size  1].
: [[font][size=2]This sentence has size  2].
: [[font][size=3]This sentence has size  3].
: [[font][size=4]This sentence has size  4].
: [[font][size=5]This sentence has size  5].
: [[font][size=6]This sentence has size  6].
: [[font][size=7]This sentence has size  7].
: [[font][size=8]This sentence has size  8].

: [[font][face=Courier]This is a sentence in Courier].

Parameters can be combined deliberately:

Courier, size 6, orange, bold, italic.

FolderWikiTechniques FolderWiki

(C) The Tolkien Wiki Community Page last changed: August 23, 2002