SourceForge.net Logo
May 18, 2006
GPL
ProWikiCenter
Cdml Font

From: CdmlElements

Description

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


Example

The following line:

This word is RED.

results from the source-line:

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


Parameters

  • 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!

Parameter face extensions

There is an extension to the face parameters allowing to express all other text attributes in a single string:

Arial@5ibu#green

You may add a section starting with '@' that optionally defines size, bold, italic and underline. The size - if given - must be given first, the order of the other command characters (BbIiUu) is arbitrary.

You may add a section starting with '#' that defines the color in the same way as the color parameter.

This extension reused in other CdmlElements like CdmlQuote or CdmlText, that allow you to redefine the text attributes.


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.


FolderWikiFeatures FolderCdml