Imported Upstream version 2.13.1
[platform/upstream/fontconfig.git] / doc / fcweight.sgml
1 <!--
2    fontconfig/doc/func.sgml
3   
4    Copyright © 2003 Keith Packard
5   
6    Permission to use, copy, modify, distribute, and sell this software and its
7    documentation for any purpose is hereby granted without fee, provided that
8    the above copyright notice appear in all copies and that both that
9    copyright notice and this permission notice appear in supporting
10    documentation, and that the name of the author(s) not be used in
11    advertising or publicity pertaining to distribution of the software without
12    specific, written prior permission.  The authors make no
13    representations about the suitability of this software for any purpose.  It
14    is provided "as is" without express or implied warranty.
15   
16    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22    PERFORMANCE OF THIS SOFTWARE.
23  -->
24     <refentry id="FcWeightFromOpenTypeDouble">
25         <refmeta>
26             <refentrytitle>FcWeightFromOpenTypeDouble</refentrytitle>
27             <manvolnum>3</manvolnum>
28             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
29         </refmeta>
30         <refnamediv>
31             <refname>FcWeightFromOpenTypeDouble</refname>
32             <refpurpose>Convert from OpenType weight values to fontconfig ones</refpurpose>
33         </refnamediv>
34         <refsynopsisdiv>
35         <funcsynopsis>
36         <funcsynopsisinfo>
37 #include &lt;fontconfig/fontconfig.h&gt;
38         </funcsynopsisinfo>
39         <funcprototype>
40             <funcdef>double <function>FcWeightFromOpenTypeDouble</function></funcdef>
41                 <paramdef>double<parameter>ot_weight</parameter></paramdef>
42         </funcprototype>
43         </funcsynopsis>
44         </refsynopsisdiv>
45         <refsect1><title>Description</title>
46             <para>
47 <function>FcWeightFromOpenTypeDouble</function> returns an double value
48 to use with FC_WEIGHT, from an double in the 1..1000 range, resembling
49 the numbers from OpenType specification's OS/2 usWeight numbers, which
50 are also similar to CSS font-weight numbers.  If input is negative,
51 zero, or greater than 1000, returns -1.  This function linearly doubleerpolates
52 between various FC_WEIGHT_* constants.  As such, the returned value does not
53 necessarily match any of the predefined constants.
54             </para>
55         </refsect1>
56         <refsect1><title>Since</title>
57             <para>version 2.12.92</para>
58         </refsect1>
59     </refentry>
60 <!--
61    fontconfig/doc/func.sgml
62   
63    Copyright © 2003 Keith Packard
64   
65    Permission to use, copy, modify, distribute, and sell this software and its
66    documentation for any purpose is hereby granted without fee, provided that
67    the above copyright notice appear in all copies and that both that
68    copyright notice and this permission notice appear in supporting
69    documentation, and that the name of the author(s) not be used in
70    advertising or publicity pertaining to distribution of the software without
71    specific, written prior permission.  The authors make no
72    representations about the suitability of this software for any purpose.  It
73    is provided "as is" without express or implied warranty.
74   
75    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
76    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
77    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
78    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
79    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
80    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
81    PERFORMANCE OF THIS SOFTWARE.
82  -->
83     <refentry id="FcWeightToOpenTypeDouble">
84         <refmeta>
85             <refentrytitle>FcWeightToOpenTypeDouble</refentrytitle>
86             <manvolnum>3</manvolnum>
87             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
88         </refmeta>
89         <refnamediv>
90             <refname>FcWeightToOpenTypeDouble</refname>
91             <refpurpose>Convert from fontconfig weight values to OpenType ones</refpurpose>
92         </refnamediv>
93         <refsynopsisdiv>
94         <funcsynopsis>
95         <funcsynopsisinfo>
96 #include &lt;fontconfig/fontconfig.h&gt;
97         </funcsynopsisinfo>
98         <funcprototype>
99             <funcdef>double <function>FcWeightToOpenTypeDouble</function></funcdef>
100                 <paramdef>double<parameter>ot_weight</parameter></paramdef>
101         </funcprototype>
102         </funcsynopsis>
103         </refsynopsisdiv>
104         <refsect1><title>Description</title>
105             <para>
106 <function>FcWeightToOpenTypeDouble</function> is the inverse of
107 <function>FcWeightFromOpenType</function>.  If the input is less than
108 FC_WEIGHT_THIN or greater than FC_WEIGHT_EXTRABLACK, returns -1.  Otherwise
109 returns a number in the range 1 to 1000.
110             </para>
111         </refsect1>
112         <refsect1><title>Since</title>
113             <para>version 2.12.92</para>
114         </refsect1>
115     </refentry>
116 <!--
117    fontconfig/doc/func.sgml
118   
119    Copyright © 2003 Keith Packard
120   
121    Permission to use, copy, modify, distribute, and sell this software and its
122    documentation for any purpose is hereby granted without fee, provided that
123    the above copyright notice appear in all copies and that both that
124    copyright notice and this permission notice appear in supporting
125    documentation, and that the name of the author(s) not be used in
126    advertising or publicity pertaining to distribution of the software without
127    specific, written prior permission.  The authors make no
128    representations about the suitability of this software for any purpose.  It
129    is provided "as is" without express or implied warranty.
130   
131    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
132    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
133    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
134    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
135    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
136    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
137    PERFORMANCE OF THIS SOFTWARE.
138  -->
139     <refentry id="FcWeightFromOpenType">
140         <refmeta>
141             <refentrytitle>FcWeightFromOpenType</refentrytitle>
142             <manvolnum>3</manvolnum>
143             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
144         </refmeta>
145         <refnamediv>
146             <refname>FcWeightFromOpenType</refname>
147             <refpurpose>Convert from OpenType weight values to fontconfig ones</refpurpose>
148         </refnamediv>
149         <refsynopsisdiv>
150         <funcsynopsis>
151         <funcsynopsisinfo>
152 #include &lt;fontconfig/fontconfig.h&gt;
153         </funcsynopsisinfo>
154         <funcprototype>
155             <funcdef>int <function>FcWeightFromOpenType</function></funcdef>
156                 <paramdef>int<parameter>ot_weight</parameter></paramdef>
157         </funcprototype>
158         </funcsynopsis>
159         </refsynopsisdiv>
160         <refsect1><title>Description</title>
161             <para>
162 <function>FcWeightFromOpenType</function> is like
163 <function>FcWeightFromOpenTypeDouble</function> but with integer arguments.
164 Use the other function instead.
165             </para>
166         </refsect1>
167         <refsect1><title>Since</title>
168             <para>version 2.11.91</para>
169         </refsect1>
170     </refentry>
171 <!--
172    fontconfig/doc/func.sgml
173   
174    Copyright © 2003 Keith Packard
175   
176    Permission to use, copy, modify, distribute, and sell this software and its
177    documentation for any purpose is hereby granted without fee, provided that
178    the above copyright notice appear in all copies and that both that
179    copyright notice and this permission notice appear in supporting
180    documentation, and that the name of the author(s) not be used in
181    advertising or publicity pertaining to distribution of the software without
182    specific, written prior permission.  The authors make no
183    representations about the suitability of this software for any purpose.  It
184    is provided "as is" without express or implied warranty.
185   
186    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
187    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
188    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
189    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
190    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
191    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
192    PERFORMANCE OF THIS SOFTWARE.
193  -->
194     <refentry id="FcWeightToOpenType">
195         <refmeta>
196             <refentrytitle>FcWeightToOpenType</refentrytitle>
197             <manvolnum>3</manvolnum>
198             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
199         </refmeta>
200         <refnamediv>
201             <refname>FcWeightToOpenType</refname>
202             <refpurpose>Convert from fontconfig weight values to OpenType ones</refpurpose>
203         </refnamediv>
204         <refsynopsisdiv>
205         <funcsynopsis>
206         <funcsynopsisinfo>
207 #include &lt;fontconfig/fontconfig.h&gt;
208         </funcsynopsisinfo>
209         <funcprototype>
210             <funcdef>int <function>FcWeightToOpenType</function></funcdef>
211                 <paramdef>int<parameter>ot_weight</parameter></paramdef>
212         </funcprototype>
213         </funcsynopsis>
214         </refsynopsisdiv>
215         <refsect1><title>Description</title>
216             <para>
217 <function>FcWeightToOpenType</function> is like
218 <function>FcWeightToOpenTypeDouble</function> but with integer arguments.
219 Use the other function instead.
220             </para>
221         </refsect1>
222         <refsect1><title>Since</title>
223             <para>version 2.11.91</para>
224         </refsect1>
225     </refentry>