Turbine
can format text in powerful ways - for example the following MML tags
display the Arial font in different styles, as selected by the common
HTML <b> and <i> tags:
<Text>
<Font face="Arial" size="30">
This is text in Arial, <b>this
in Arial Bold and <i>this in Arial bold italic.</i></b>
</Font>
</Text>
<Text>
<font face="Arial" size="30"
color="#ff0000">
This is text in red,
</font>
<br>
<font color="#00ff00" size="30">
this is green and
</font>
<br>
<font color="#0000ff" size="30">
this one is in blue
</font>
</Text>
Turbine
can align text on the usual alignment types, by using the <p> tag:
<Text>
<font face="Times New Roman"
size="24">
<p align="left">
This is left-aligned
text,
</p>
<p
align="right">
this is right-aligned
text,
</p>
<p
align="center">
this is centered
text and
</p>
<p
align="justify">
here we have lots
and lots and lots and still lots and still lots and
lots and lots and lots and lots and lots and lots of
justified text.
</p>
More
than aligning text, Turbine can layout text in flow areas, to create
sophisticated page layouts - for example the following MML tags:
<Text
bounds="0,0,600,70;400,70,600,140;0,140,600,200">
<font face="Times New Roman"
size="20">
<p align="justify">Here
we have lots and lots and lots and still lots and lots
and lots of justified text. Still, text continues and
continues and continues to make its way on and on across
the available space. Sooner or later, surely text will
at some point terminate, which is certainly a change
from the current state of things! Well, and here we
have lots and lots and lots and still lots and lots
and lots of justified text. Still, text continues...
</p>
</font>
</Text>
Turbine
supports Unicode, which means that it can handle any characters from
English, Latin, Cyrillic, Middle East or Far East languages. Unicode
characters can be entered through the usual XML entities, or directly
from UTF-8 and Unicode text files. For example:
The
above capabilities as well as advanced options like line leading,
character spacing, <PRE> support and many others can be combined
for sophisticated text formatting. For example, the following tags:
<Text>
<font face="Arial" size="17">
<p spacing="-1">This
text has spacing set to -1.</p><br/>
<p spacing="3">This
text has spacing set to +3 pixels.</p><br/>
<p>The next text is displayed
with a <pre> tag, which causes space characters
to be respected:</p>
<pre>Some text, spaces
and then text again.</pre><br/>
<p><font color="#FF00FF">T</font><font
color="#FF00CC">h</font>
<font color="#FF0099">i</font><font
color="#FF0066">s</font>
<font color="#FF0033">t</font><font
color="#FF0000">e</font>
<font color="#FF3300">x</font><font
color="#FF6600">t</font>
<font color="#FF9900">i</font><font
color="#FFCC00">s</font>
<font color="#FFFF00">r</font><font
color="#CCFF00">a</font>
<font color="#99FF00">i</font><font
color="#66FF00">n</font>
<font color="#33FF00">b</font><font
color="#00FF00">o</font>
<font color="#00FF33">w</font>
<font color="#00FF66">c</font>
<font color="#00FF99">o</font><font
color="#00FFCC">l</font>
<font color="#00FFFF">o</font><font
color="#00CCFF">r</font>
<font color="#0099FF">e</font><font
color="#0066FF">d</font>
</p><br/>
</font>
</Text>