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="FcWeightFromOpenType">
26 <refentrytitle>FcWeightFromOpenType</refentrytitle>
27 <manvolnum>3</manvolnum>
28 <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
31 <refname>FcWeightFromOpenType</refname>
32 <refpurpose>Convert from OpenType weight values to fontconfig ones</refpurpose>
37 #include <fontconfig/fontconfig.h>
40 <funcdef>int <function>FcWeightFromOpenType</function></funcdef>
41 <paramdef>int<parameter>ot_weight</parameter></paramdef>
45 <refsect1><title>Description</title>
47 <function>FcWeightFromOpenType</function> returns an integer value
48 to use with FC_WEIGHT, from an integer 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 interpolates
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.11.91</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="FcWeightToOpenType">
85 <refentrytitle>FcWeightToOpenType</refentrytitle>
86 <manvolnum>3</manvolnum>
87 <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
90 <refname>FcWeightToOpenType</refname>
91 <refpurpose>Convert from fontconfig weight values to OpenType ones</refpurpose>
96 #include <fontconfig/fontconfig.h>
99 <funcdef>int <function>FcWeightToOpenType</function></funcdef>
100 <paramdef>int<parameter>ot_weight</parameter></paramdef>
104 <refsect1><title>Description</title>
106 <function>FcWeightToOpenType</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.11.91</para>