added notes on pango inline formatting
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Fri, 3 Aug 2007 19:17:13 +0000 (19:17 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Fri, 3 Aug 2007 19:17:13 +0000 (19:17 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1180 a5681a0c-68f1-0310-ab6d-d61299d08faa

doc/rrdgraph_graph.pod

index c7ca4fa..abd5287 100644 (file)
@@ -364,6 +364,141 @@ characters or the sequence B<\t> to line-up legend elements. Note that
 the tabs inserted are relative to the start of the current legend
 element!
 
 the tabs inserted are relative to the start of the current legend
 element!
 
+Since RRDtool 1.3 is using Pango for rending text, you can use Pango markup.
+Pango uses the xml B<span> tags for inline formatting instructions.:
+
+A simple example of a marked-up string might be: 
+
+ <span foreground="blue" size="x-large">Blue text</span> is <i>cool</i>!
+
+The complete list of attributes for the span tag (taken from the pango documentation):
+
+=over
+
+=item B<font_desc>
+
+A font description string, such as "Sans Italic 12"; note that any other span attributes will override this description. So if you have "Sans Italic" and also a style="normal" attribute, you will get Sans normal, not italic.
+
+=item B<font_family>
+
+A font family name
+
+=item B<face>
+
+Synonym for font_family
+
+=item B<size>
+
+Font size in 1024ths of a point, or one of the absolute sizes 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', or one of the relative sizes 'smaller' or 'larger'. If you want to specify a absolute size, it's usually easier to take advantage of the ability to specify a partial font description using 'font_desc'; you can use font_desc='12.5' rather than size='12800'.
+
+=item B<style>
+
+One of 'normal', 'oblique', 'italic'
+
+=item B<weight>
+
+One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight
+
+=item B<variant>
+
+'normal' or 'smallcaps'
+
+=item B<stretch>
+
+One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded', 'ultraexpanded'
+
+=item B<foreground>
+
+An RGB color specification such as '#00FF00' or a color name such as 'red'
+
+=item B<background>
+
+An RGB color specification such as '#00FF00' or a color name such as 'red'
+
+=item B<underline>
+
+One of 'none', 'single', 'double', 'low', 'error'
+
+=item B<underline_color>
+
+The color of underlines; an RGB color specification such as '#00FF00' or a color name such as 'red'
+
+=item B<rise>
+
+Vertical displacement, in 10000ths of an em. Can be negative for subscript, positive for superscript.
+
+=item B<strikethrough>
+
+'true' or 'false' whether to strike through the text
+
+=item B<strikethrough_color>
+
+The color of strikethrough lines; an RGB color specification such as '#00FF00' or a color name such as 'red'
+
+=item B<fallback>
+
+'true' or 'false' whether to enable fallback. If disabled, then characters will only be used from the closest matching font on the system. No fallback will be done to other fonts on the system that might contain the characters in the text. Fallback is enabled by default. Most applications should not disable fallback.
+
+=item B<lang>
+
+A language code, indicating the text language
+
+=item B<letter_spacing>
+
+Inter-letter spacing in 1024ths of a point.
+
+=item B<gravity>
+
+One of 'south', 'east', 'north', 'west', 'auto'.
+
+=item B<gravity_hint>
+
+One of 'natural', 'strong', 'line'.
+
+=back
+
+To save you some typing, there are also some shortcuts:
+
+=over
+
+=item B<b>
+
+Bold
+
+=item B<big>
+
+Makes font relatively larger, equivalent to <span size="larger">
+
+=item B<i>
+
+Italic
+
+=item B<s>
+
+Strikethrough
+
+=item B<sub>
+
+Subscript
+
+=item B<sup>
+
+Superscript
+
+=item B<small>
+
+Makes font relatively smaller, equivalent to <span size="smaller">
+
+=item B<tt>
+
+Monospace font
+
+=item B<u>
+
+Underline 
+
+=back
+
 =head1 SEE ALSO
 
 L<rrdgraph> gives an overview of how B<rrdtool graph> works.
 =head1 SEE ALSO
 
 L<rrdgraph> gives an overview of how B<rrdtool graph> works.