2 fontconfig/doc/func.sgml
4 Copyright © 2003 Keith Packard
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.
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.
24 <refentry id="FcWeightFromOpenTypeDouble">
26 <refentrytitle>FcWeightFromOpenTypeDouble</refentrytitle>
27 <manvolnum>3</manvolnum>
28 <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
31 <refname>FcWeightFromOpenTypeDouble</refname>
32 <refpurpose>Convert from OpenType weight values to fontconfig ones</refpurpose>
37 #include <fontconfig/fontconfig.h>
40 <funcdef>double <function>FcWeightFromOpenTypeDouble</function></funcdef>
41 <paramdef>double<parameter>ot_weight</parameter></paramdef>
45 <refsect1><title>Description</title>
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.
56 <refsect1><title>Since</title>
57 <para>version 2.12.92</para>
61 fontconfig/doc/func.sgml
63 Copyright © 2003 Keith Packard
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.
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.
83 <refentry id="FcWeightToOpenTypeDouble">
85 <refentrytitle>FcWeightToOpenTypeDouble</refentrytitle>
86 <manvolnum>3</manvolnum>
87 <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
90 <refname>FcWeightToOpenTypeDouble</refname>
91 <refpurpose>Convert from fontconfig weight values to OpenType ones</refpurpose>
96 #include <fontconfig/fontconfig.h>
99 <funcdef>double <function>FcWeightToOpenTypeDouble</function></funcdef>
100 <paramdef>double<parameter>ot_weight</parameter></paramdef>
104 <refsect1><title>Description</title>
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.
112 <refsect1><title>Since</title>
113 <para>version 2.12.92</para>
117 fontconfig/doc/func.sgml
119 Copyright © 2003 Keith Packard
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.
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.
139 <refentry id="FcWeightFromOpenType">
141 <refentrytitle>FcWeightFromOpenType</refentrytitle>
142 <manvolnum>3</manvolnum>
143 <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
146 <refname>FcWeightFromOpenType</refname>
147 <refpurpose>Convert from OpenType weight values to fontconfig ones</refpurpose>
152 #include <fontconfig/fontconfig.h>
155 <funcdef>int <function>FcWeightFromOpenType</function></funcdef>
156 <paramdef>int<parameter>ot_weight</parameter></paramdef>
160 <refsect1><title>Description</title>
162 <function>FcWeightFromOpenType</function> is like
163 <function>FcWeightFromOpenTypeDouble</function> but with integer arguments.
164 Use the other function instead.
167 <refsect1><title>Since</title>
168 <para>version 2.11.91</para>
172 fontconfig/doc/func.sgml
174 Copyright © 2003 Keith Packard
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.
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.
194 <refentry id="FcWeightToOpenType">
196 <refentrytitle>FcWeightToOpenType</refentrytitle>
197 <manvolnum>3</manvolnum>
198 <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
201 <refname>FcWeightToOpenType</refname>
202 <refpurpose>Convert from fontconfig weight values to OpenType ones</refpurpose>
207 #include <fontconfig/fontconfig.h>
210 <funcdef>int <function>FcWeightToOpenType</function></funcdef>
211 <paramdef>int<parameter>ot_weight</parameter></paramdef>
215 <refsect1><title>Description</title>
217 <function>FcWeightToOpenType</function> is like
218 <function>FcWeightToOpenTypeDouble</function> but with integer arguments.
219 Use the other function instead.
222 <refsect1><title>Since</title>
223 <para>version 2.11.91</para>