Blame doc/fcweight.fncs

Packit 352660
/*
Packit 352660
 * fontconfig/doc/fcweight.fncs
Packit 352660
 *
Packit 352660
 * Permission to use, copy, modify, distribute, and sell this software and its
Packit 352660
 * documentation for any purpose is hereby granted without fee, provided that
Packit 352660
 * the above copyright notice appear in all copies and that both that
Packit 352660
 * copyright notice and this permission notice appear in supporting
Packit 352660
 * documentation, and that the name of the author(s) not be used in
Packit 352660
 * advertising or publicity pertaining to distribution of the software without
Packit 352660
 * specific, written prior permission.  The authors make no
Packit 352660
 * representations about the suitability of this software for any purpose.  It
Packit 352660
 * is provided "as is" without express or implied warranty.
Packit 352660
 *
Packit 352660
 * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
Packit 352660
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
Packit 352660
 * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
Packit 352660
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
Packit 352660
 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
Packit 352660
 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
Packit 352660
 * PERFORMANCE OF THIS SOFTWARE.
Packit 352660
 */
Packit 352660
@RET@		double
Packit 352660
@FUNC@		FcWeightFromOpenTypeDouble
Packit 352660
@TYPE1@		double				@ARG1@		ot_weight
Packit 352660
@PURPOSE@	Convert from OpenType weight values to fontconfig ones
Packit 352660
@DESC@
Packit 352660
<function>FcWeightFromOpenTypeDouble</function> returns an double value
Packit 352660
to use with FC_WEIGHT, from an double in the 1..1000 range, resembling
Packit 352660
the numbers from OpenType specification's OS/2 usWeight numbers, which
Packit 352660
are also similar to CSS font-weight numbers.  If input is negative,
Packit 352660
zero, or greater than 1000, returns -1.  This function linearly doubleerpolates
Packit 352660
between various FC_WEIGHT_* constants.  As such, the returned value does not
Packit 352660
necessarily match any of the predefined constants.
Packit 352660
@SINCE@		2.12.92
Packit 352660
@@
Packit 352660
Packit 352660
@RET@		double
Packit 352660
@FUNC@		FcWeightToOpenTypeDouble
Packit 352660
@TYPE1@		double				@ARG1@		ot_weight
Packit 352660
@PURPOSE@	Convert from fontconfig weight values to OpenType ones
Packit 352660
@DESC@
Packit 352660
<function>FcWeightToOpenTypeDouble</function> is the inverse of
Packit 352660
<function>FcWeightFromOpenType</function>.  If the input is less than
Packit 352660
FC_WEIGHT_THIN or greater than FC_WEIGHT_EXTRABLACK, returns -1.  Otherwise
Packit 352660
returns a number in the range 1 to 1000.
Packit 352660
@SINCE@		2.12.92
Packit 352660
@@
Packit 352660
Packit 352660
@RET@		int
Packit 352660
@FUNC@		FcWeightFromOpenType
Packit 352660
@TYPE1@		int				@ARG1@		ot_weight
Packit 352660
@PURPOSE@	Convert from OpenType weight values to fontconfig ones
Packit 352660
@DESC@
Packit 352660
<function>FcWeightFromOpenType</function> is like
Packit 352660
<function>FcWeightFromOpenTypeDouble</function> but with integer arguments.
Packit 352660
Use the other function instead.
Packit 352660
@SINCE@		2.11.91
Packit 352660
@@
Packit 352660
Packit 352660
@RET@		int
Packit 352660
@FUNC@		FcWeightToOpenType
Packit 352660
@TYPE1@		int				@ARG1@		ot_weight
Packit 352660
@PURPOSE@	Convert from fontconfig weight values to OpenType ones
Packit 352660
@DESC@
Packit 352660
<function>FcWeightToOpenType</function> is like
Packit 352660
<function>FcWeightToOpenTypeDouble</function> but with integer arguments.
Packit 352660
Use the other function instead.
Packit 352660
@SINCE@		2.11.91
Packit 352660
@@