Let the other namespaces in!
[shapes.git] / doc / parts / dynamic / text.sxml
blob8905b4f51e9e159999319eded1948dc449fa7a43
1 <!-- This file is part of Shapes.                                           -->
2 <!--                                                                        -->
3 <!-- Shapes is free software: you can redistribute it and/or modify         -->
4 <!-- it under the terms of the GNU General Public License as published by   -->
5 <!-- the Free Software Foundation, either version 3 of the License, or      -->
6 <!-- any later version.                                                     -->
7 <!--                                                                        -->
8 <!-- Shapes is distributed in the hope that it will be useful,              -->
9 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of         -->
10 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          -->
11 <!-- GNU General Public License for more details.                           -->
12 <!--                                                                        -->
13 <!-- You should have received a copy of the GNU General Public License      -->
14 <!-- along with Shapes.  If not, see <http://www.gnu.org/licenses/>.        -->
15 <!--                                                                        -->
16 <!-- Copyright 2008, 2009 Henrik Tidefelt                                   -->
18 <section id="dynamic/text">
19 <title>Text</title>
20 <top>
21         <p>The bindings in this section are closely related to the <em>text state parameters</em> in <str-PDF />.</p>
22 </top>
24 <dynamic-variable name="text_font">
25         <type><named-type name="Font" /></type>
26         <default><inline>FONT_HELVETICA</inline></default>
27         <description>
28                 <p>Intended to be used when creating text using the built-in mechanisms of <str-PDF />.</p>
29         </description>
30 </dynamic-variable>
32 <dynamic-variable name="text_size">
33         <type><named-type name="Length" /></type>
34         <default><physical><scalar>10</scalar><unit>bp</unit></physical></default>
35         <constraint><self /> &gt; <physical><scalar>0</scalar><unit>bp</unit></physical></constraint>
36         <description>
37                 <p>Intended to be used as the size of text.</p>
38         </description>
39 </dynamic-variable>
41 <dynamic-variable name="text_horizontalscaling">
42         <type><named-type name="Float" /></type>
43         <default><scalar>1</scalar></default>
44         <constraint><self /> &gt; <scalar>0</scalar></constraint>
45         <description>
46                 <p>Horizontal scaling of the font.</p>
47         </description>
48 </dynamic-variable>
50 <dynamic-variable name="text_rendering">
51         <type><named-type name="TextRenderingMode" /></type>
52         <description>
53                 <p>Text rendering mode.</p>
54                 <note>
55                         <p><em>Design note:</em> It would have been possible to split the rendering mode into two separate dynamic variables; one for stroking, and one for filling.  One obvious benefit of this would have been that the special type <named-type name="TextRenderingMode" /> would not have been necessary.  However, the rendering mode is usually perceived as one entity; controlling one of the two flags while not caring about the other seems very unlikely.  This is why the two are kept together.</p>
56                 </note>
57         </description>
58         <see-also>
59                 <value name="clip" />
60         </see-also>
61 </dynamic-variable>
63 <dynamic-variable name="text_knockout">
64         <type><named-type name="Boolean" /></type>
65         <default><const-false /></default>
66         <description>
67                 <p>The text knockout mode.  Refer to the <str-PDF /> reference for details.</p>
68         </description>
69 </dynamic-variable>
71 <dynamic-variable name="text_characterspacing">
72         <type><union-type><named-type name="Length" /> <named-type name="Float" /></union-type></type>
73         <default><physical><scalar>0</scalar><unit>bp</unit></physical></default>
74         <description>
75                 <p>Extra space to add between characters.</p>
76                 <p>A <named-type name="Float" /> is interpreted as a scaling of <dynamic name="text_size" />.</p>
77         </description>
78 </dynamic-variable>
80 <dynamic-variable name="text_wordspacing">
81         <type><union-type><named-type name="Length" /> <named-type name="Float" /></union-type></type>
82         <default><physical><scalar>0</scalar><unit>bp</unit></physical></default>
83         <description>
84                 <p>Extra space to add at each space character.</p>
85                 <p>A <named-type name="Float" /> is interpreted as a scaling of <dynamic name="text_size" />.</p>
86         </description>
87 </dynamic-variable>
89 <dynamic-variable name="text_leading">
90         <type><union-type><named-type name="Length" /> <named-type name="Float" /></union-type></type>
91         <default><scalar>1</scalar></default>
92         <description>
93                 <p>The vertical distance between lines of text.</p>
94                 <p>A <named-type name="Float" /> is interpreted as a scaling of <dynamic name="text_size" />.</p>
95         </description>
96 </dynamic-variable>
98 <dynamic-variable name="text_rise">
99         <type><union-type><named-type name="Length" /> <named-type name="Float" /></union-type></type>
100         <default><scalar>1</scalar></default>
101         <description>
102                 <p>Vertical offset of the text from the normal baseline.</p>
103                 <p>A <named-type name="Float" /> is interpreted as a scaling of <dynamic name="text_size" />.</p>
104         </description>
105 </dynamic-variable>
107 </section>