116 lines
4.7 KiB
Plaintext
116 lines
4.7 KiB
Plaintext
|
<!--
|
||
|
fontconfig/doc/func.sgml
|
||
|
|
||
|
Copyright © 2003 Keith Packard
|
||
|
|
||
|
Permission to use, copy, modify, distribute, and sell this software and its
|
||
|
documentation for any purpose is hereby granted without fee, provided that
|
||
|
the above copyright notice appear in all copies and that both that
|
||
|
copyright notice and this permission notice appear in supporting
|
||
|
documentation, and that the name of the author(s) not be used in
|
||
|
advertising or publicity pertaining to distribution of the software without
|
||
|
specific, written prior permission. The authors make no
|
||
|
representations about the suitability of this software for any purpose. It
|
||
|
is provided "as is" without express or implied warranty.
|
||
|
|
||
|
THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||
|
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||
|
EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||
|
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||
|
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||
|
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
-->
|
||
|
<refentry id="FcWeightFromOpenType">
|
||
|
<refmeta>
|
||
|
<refentrytitle>FcWeightFromOpenType</refentrytitle>
|
||
|
<manvolnum>3</manvolnum>
|
||
|
<refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
|
||
|
</refmeta>
|
||
|
<refnamediv>
|
||
|
<refname>FcWeightFromOpenType</refname>
|
||
|
<refpurpose>Convert from OpenType weight values to fontconfig ones</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsynopsisdiv>
|
||
|
<funcsynopsis>
|
||
|
<funcsynopsisinfo>
|
||
|
#include <fontconfig/fontconfig.h>
|
||
|
</funcsynopsisinfo>
|
||
|
<funcprototype>
|
||
|
<funcdef>int <function>FcWeightFromOpenType</function></funcdef>
|
||
|
<paramdef>int<parameter>ot_weight</parameter></paramdef>
|
||
|
</funcprototype>
|
||
|
</funcsynopsis>
|
||
|
</refsynopsisdiv>
|
||
|
<refsect1><title>Description</title>
|
||
|
<para>
|
||
|
<function>FcWeightFromOpenType</function> returns an integer value
|
||
|
to use with FC_WEIGHT, from an integer in the 1..1000 range, resembling
|
||
|
the numbers from OpenType specification's OS/2 usWeight numbers, which
|
||
|
are also similar to CSS font-weight numbers. If input is negative,
|
||
|
zero, or greater than 1000, returns -1. This function linearly interpolates
|
||
|
between various FC_WEIGHT_* constants. As such, the returned value does not
|
||
|
necessarily match any of the predefined constants.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1><title>Since</title>
|
||
|
<para>version 2.11.91</para>
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
<!--
|
||
|
fontconfig/doc/func.sgml
|
||
|
|
||
|
Copyright © 2003 Keith Packard
|
||
|
|
||
|
Permission to use, copy, modify, distribute, and sell this software and its
|
||
|
documentation for any purpose is hereby granted without fee, provided that
|
||
|
the above copyright notice appear in all copies and that both that
|
||
|
copyright notice and this permission notice appear in supporting
|
||
|
documentation, and that the name of the author(s) not be used in
|
||
|
advertising or publicity pertaining to distribution of the software without
|
||
|
specific, written prior permission. The authors make no
|
||
|
representations about the suitability of this software for any purpose. It
|
||
|
is provided "as is" without express or implied warranty.
|
||
|
|
||
|
THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||
|
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||
|
EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||
|
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||
|
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||
|
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
-->
|
||
|
<refentry id="FcWeightToOpenType">
|
||
|
<refmeta>
|
||
|
<refentrytitle>FcWeightToOpenType</refentrytitle>
|
||
|
<manvolnum>3</manvolnum>
|
||
|
<refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
|
||
|
</refmeta>
|
||
|
<refnamediv>
|
||
|
<refname>FcWeightToOpenType</refname>
|
||
|
<refpurpose>Convert from fontconfig weight values to OpenType ones</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsynopsisdiv>
|
||
|
<funcsynopsis>
|
||
|
<funcsynopsisinfo>
|
||
|
#include <fontconfig/fontconfig.h>
|
||
|
</funcsynopsisinfo>
|
||
|
<funcprototype>
|
||
|
<funcdef>int <function>FcWeightToOpenType</function></funcdef>
|
||
|
<paramdef>int<parameter>ot_weight</parameter></paramdef>
|
||
|
</funcprototype>
|
||
|
</funcsynopsis>
|
||
|
</refsynopsisdiv>
|
||
|
<refsect1><title>Description</title>
|
||
|
<para>
|
||
|
<function>FcWeightToOpenType</function> is the inverse of
|
||
|
<function>FcWeightFromOpenType</function>. If the input is less than
|
||
|
FC_WEIGHT_THIN or greater than FC_WEIGHT_EXTRABLACK, returns -1. Otherwise
|
||
|
returns a number in the range 1 to 1000.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1><title>Since</title>
|
||
|
<para>version 2.11.91</para>
|
||
|
</refsect1>
|
||
|
</refentry>
|