* Bug #14065 fixed - Change "java size" in points in graphics font help page.
[scilab.git] / scilab / modules / graphics / help / en_US / text / graphics_fonts.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C)  2009 - Digiteo - Jean-Baptiste Silvy
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
11  *
12  -->
13 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"  xml:lang="en" xml:id="graphics_fonts">
14     <refnamediv>
15         <refname>graphics fonts</refname>
16         <refpurpose>description of fonts used in graphic figures</refpurpose>
17     </refnamediv>
18     <refsection>
19         <title>Description</title>
20         <para>
21             Some Graphic entities such as Text, Axes, Label or Legend entities display one or more character strings in graphic figures. The appearance of the displayed strings 
22             can be modified by specifying different fonts and character sizes.
23         </para>
24         <para/>
25         <variablelist>
26             <varlistentry>
27                 <term>Changing font</term>
28                 <listitem>
29                     <para>
30                         Fonts used in graphic figures are selected from a set of fonts called loaded fonts. In other words, the loaded fonts are the ones currenlty available in graphic figures.
31                         The list of these fonts can be obtained using the <literal>xlfont</literal> function without argument. 
32                         By default, Scilab contains a set of 11 loaded fonts. This set can be modified and extended using the <literal>xlfont</literal> function with
33                         a font name as argument. The added font can either be loaded from a file or be one of the system. To know the list of fonts available on the system use the
34                         <literal>xlfont('AVAILABLE_FONTS')</literal> command.
35                         For more information on how to manipulate fonts see <link linkend="xlfont">xlfont</link>.
36                     </para>
37                     <para>
38                         Here is the list of the 11 default fonts.
39                     </para>
40                     <informaltable border="1">
41                         <tr>
42                             <td>
43                                 <emphasis role="bold">Font number</emphasis>
44                             </td>
45                             <td>
46                                 <emphasis role="bold">Font Family</emphasis>
47                             </td>
48                             <td>
49                                 <emphasis role="bold">Bold</emphasis>
50                             </td>
51                             <td>
52                                 <emphasis role="bold">Italic</emphasis>
53                             </td>
54                         </tr>
55                         <tr>
56                             <td>0</td>
57                             <td>Monospaced</td>
58                             <td>No</td>
59                             <td>No</td>
60                         </tr>
61                         <tr>
62                             <td>1</td>
63                             <td>ScilabSymbols</td>
64                             <td>No</td>
65                             <td>No</td>
66                         </tr>
67                         <tr>
68                             <td>2</td>
69                             <td>Serif</td>
70                             <td>No</td>
71                             <td>No</td>
72                         </tr>
73                         <tr>
74                             <td>3</td>
75                             <td>Serif</td>
76                             <td>No</td>
77                             <td>Yes</td>
78                         </tr>
79                         <tr>
80                             <td>4</td>
81                             <td>Serif</td>
82                             <td>Yes</td>
83                             <td>No</td>
84                         </tr>
85                         <tr>
86                             <td>5</td>
87                             <td>Serif</td>
88                             <td>Yes</td>
89                             <td>Yes</td>
90                         </tr>
91                         <tr>
92                             <td>6</td>
93                             <td>SansSerif</td>
94                             <td>No</td>
95                             <td>No</td>
96                         </tr>
97                         <tr>
98                             <td>7</td>
99                             <td>SansSerif</td>
100                             <td>No</td>
101                             <td>Yes</td>
102                         </tr>
103                         <tr>
104                             <td>8</td>
105                             <td>SansSerif</td>
106                             <td>Yes</td>
107                             <td>No</td>
108                         </tr>
109                         <tr>
110                             <td>9</td>
111                             <td>SansSerif</td>
112                             <td>Yes</td>
113                             <td>Yes</td>
114                         </tr>
115                         <tr>
116                             <td>10</td>
117                             <td>SansSerif</td>
118                             <td>Yes</td>
119                             <td>Yes</td>
120                         </tr>
121                     </informaltable>
122                     <para>
123                         The font used by a graphic entities can be modified with its <literal>font_style</literal> property.
124                         This is a positive integer referecing one of the loaded fonts. Its value must be between 0, referecing the first font,
125                         and the number of loaded fonts minus one, referencing the last font.
126                     </para>
127                     <para>
128                         The <literal>fractional_font</literal> controls the font anti-aliasing. Its value can be either <literal>'on'</literal>
129                         or <literal>'off'</literal>. If its value is <literal>'on'</literal> the font is smoothed, otherwise it's not.
130                     </para>
131                     <para/>
132                 </listitem>
133             </varlistentry>
134             <varlistentry>
135                 <term>Changing character size </term>
136                 <listitem>
137                     <para>
138                         The text size of a graphic entity is modified using the <literal>font_size</literal> property.
139                         It is a scalar specifying the displayed character size.
140                     </para>
141                     <para>
142                         The Scilab character size is different from the point size. Here is the equivalence between the two scales.
143                     </para>
144                     <informaltable border="1">
145                         <tr>
146                             <td>
147                                 <emphasis role="bold">Scilab Size</emphasis>
148                             </td>
149                             <td>
150                                 <emphasis role="bold">Point Size</emphasis>
151                             </td>
152                         </tr>
153                         <tr>
154                             <td>0</td>
155                             <td>8</td>
156                         </tr>
157                         <tr>
158                             <td>1</td>
159                             <td>10</td>
160                         </tr>
161                         <tr>
162                             <td>2</td>
163                             <td>12</td>
164                         </tr>
165                         <tr>
166                             <td>3</td>
167                             <td>14</td>
168                         </tr>
169                         <tr>
170                             <td>4</td>
171                             <td>18</td>
172                         </tr>
173                         <tr>
174                             <td>5</td>
175                             <td>24</td>
176                         </tr>
177                         <tr>
178                             <td>6</td>
179                             <td>30</td>
180                         </tr>
181                         <tr>
182                             <td>7</td>
183                             <td>36</td>
184                         </tr>
185                         <tr>
186                             <td>8</td>
187                             <td>42</td>
188                         </tr>
189                         <tr>
190                             <td>9</td>
191                             <td>48</td>
192                         </tr>
193                         <tr>
194                             <td>10</td>
195                             <td>54</td>
196                         </tr>
197                     </informaltable>
198                     <para>
199                         The character size might not be an integer. In this case, the result depends on the entities <literal>fractional_font</literal> property.
200                         If <literal>fractional_font</literal> property is <literal>'on'</literal> then the displayed font size is interpolated between the two
201                         closest integer. For example, a font size of 2.5 displays characters of 13pt.
202                         If <literal>fractional_font</literal> property is <literal>'off'</literal> then the displayed font size is truncated to
203                         its integer part. For example, a font size of 2.5 displays characters of 12pt.
204                     </para>
205                     <para/>
206                 </listitem>
207             </varlistentry>
208         </variablelist>
209     </refsection>
210     <refsection role="see also">
211         <title>See Also</title>
212         <simplelist type="inline">
213             <member>
214                 <link linkend="xlfont">xlfont</link>
215             </member>
216             <member>
217                 <link linkend="graphics_entities">graphics_entities</link>
218             </member>
219         </simplelist>
220     </refsection>
221 </refentry>