Text formatting options

All text output for ILNumerics.Net drawing controls are capable of handling extensive text formating. Therefore special markups are allowed for Text properties of axis labels (ILAxis.Label) and axis tick labels (ILAxis.LabeledTicks collection). That way the render output can get configured character by character. Arbitrary parts of each label's text can get a different font (-name, -size and -style) assigned to it as well as different colors. For mathematical output it is important to have the possibility of drawing superscript and subscript indices as well as displaying special symbols like greek letters and relational symbols. Axis tick labels can get configured individually while they are created dynamically. This section describes in detail how all those formating is archieved.

tex labelsThe left figure demonstrates some of the text formatting options: arbitrary font styles and -sizes, supscripting, special symbols and individual colors on arbitrary parts of the labels can be seen here. Also, the color of the tick labels for the Y-axis change dynamically from green to red. How to archieve special effects like this will be discussed at the end of this section.

The formatting of the X axis label for example was done by assigning the following string to the Text property of the label:

fig.Panel.Axes.XAxis.Label.Text = 
    "\\bfX\\reset axis:\\alpha_i [\\color{red}\\Omega\\bf\\it^4\\reset]";

By default, all expressions given to the Text property are parsed for special control sequences. If a know sequence is found, it will control the next part of the expression until the end of the string or until a new sequence is again changing the state. All control sequences must start with a backslash. If a sequence is not known it is ignored. There are some sequences which carry a parameter. Those parameters directly follow the control sequence and must be enclosed into braces '{..}'. (See the '\\color{red}' sequence above for example)

Font formatting

The following sequences control the appearance of font outputs:

control sequenceDescription
\bfbold font
\ititalics
\rmregular font, clears any bold or italic font style
\fontsize{10}size of the font (points). The size can be defined by
  • absolute value, or by
  • relative values. A plus sign '+' or a minus sign '-' is used as suffix than.
\fontname{Courier}name of the font. If the font could not be found, the current font is not changed.
\color{blue}Color for the font. Valid parameters are
  • names of colors from the KnownColor enumeration, or
  • a color definition in HTML style (f.e. '#FF56E0')
\resetreset any fontstyle, -name or -size changes

Sub- and superscripts

The underscore '_' is used to create subscripts. Like well known from TEX, this is only valid for the next character. To subscript more characters, the characters must get enclosed into curly braces.

The same rules apply for superscripts, which are specified by '^'.

Special characters

All chars defined for the current font can be used for output. For some more frequently needed ones abreviations (control sequences) exist to enable users for simplified definition. The following table lists all those control sequences. However, all signs lead to the rendering of regular unicode characters. Therefore they just as well can be entered via keyboard or via unicode sequences.
Keep in mind, the chars defined here, will only specify the char to be rendered out of the currently selected font! Make sure, the font contains those characters or it will not show up!

All character sequences available for the most common fonts installed on common systems are put together in the following (large) tables. Since regular fonts installed differ on Windows and Linux systems, two tables exist.

Windows fonts - all ILNumerics.Drawing special sequences
Linux fonts - all ILNumerics.Drawing special sequences


Valid CSS! Valid XHTML 1.0 Transitional