2003-03-07 09:44:32 +01:00
|
|
|
/*
|
2008-08-13 09:30:23 +02:00
|
|
|
* fontconfig/doc/fcpattern.fncs
|
2003-03-07 09:44:32 +01:00
|
|
|
*
|
2004-12-07 02:14:46 +01:00
|
|
|
* Copyright © 2003 Keith Packard
|
2003-03-07 09:44:32 +01:00
|
|
|
*
|
|
|
|
* 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
|
2010-11-10 22:45:42 +01:00
|
|
|
* documentation, and that the name of the author(s) not be used in
|
2003-03-07 09:44:32 +01:00
|
|
|
* advertising or publicity pertaining to distribution of the software without
|
2010-11-10 22:45:42 +01:00
|
|
|
* specific, written prior permission. The authors make no
|
2003-03-07 09:44:32 +01:00
|
|
|
* representations about the suitability of this software for any purpose. It
|
|
|
|
* is provided "as is" without express or implied warranty.
|
|
|
|
*
|
2009-03-12 21:00:08 +01:00
|
|
|
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
2003-03-07 09:44:32 +01:00
|
|
|
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
2009-03-12 21:00:08 +01:00
|
|
|
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
2003-03-07 09:44:32 +01:00
|
|
|
* 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.
|
|
|
|
*/
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcPattern *
|
|
|
|
@FUNC@ FcPatternCreate
|
|
|
|
@TYPE1@ void
|
|
|
|
@PURPOSE@ Create a pattern
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
|
|
|
Creates a pattern with no properties; used to build patterns from scratch.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcPattern *
|
|
|
|
@FUNC@ FcPatternDuplicate
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ p
|
|
|
|
@PURPOSE@ Copy a pattern
|
2007-11-04 06:23:28 +01:00
|
|
|
@DESC@
|
|
|
|
Copy a pattern, returning a new pattern that matches
|
|
|
|
<parameter>p</parameter>. Each pattern may be modified without affecting the
|
|
|
|
other.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ void
|
|
|
|
@FUNC@ FcPatternReference
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ p
|
|
|
|
@PURPOSE@ Increment pattern reference count
|
2007-11-04 06:23:28 +01:00
|
|
|
@DESC@
|
|
|
|
Add another reference to <parameter>p</parameter>. Patterns are freed only
|
|
|
|
when the reference count reaches zero.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ void
|
|
|
|
@FUNC@ FcPatternDestroy
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ p
|
|
|
|
@PURPOSE@ Destroy a pattern
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
2007-11-04 06:23:28 +01:00
|
|
|
Decrement the pattern reference count. If all references are gone, destroys
|
|
|
|
the pattern, in the process destroying all related values.
|
2003-03-07 08:12:51 +01:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ int
|
|
|
|
@FUNC@ FcPatternObjectCount
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ p
|
|
|
|
@PURPOSE@ Returns the number of the object
|
2018-05-11 13:48:30 +02:00
|
|
|
@DESC@
|
|
|
|
Returns the number of the object <parameter>p</parameter> has.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.13.1
|
2018-05-11 13:48:30 +02:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcPatternEqual
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ pa
|
|
|
|
@TYPE2@ const FcPattern * @ARG2@ pb
|
|
|
|
@PURPOSE@ Compare patterns
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
2003-03-07 09:51:14 +01:00
|
|
|
Returns whether <parameter>pa</parameter> and <parameter>pb</parameter> are exactly alike.
|
2003-03-07 08:12:51 +01:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcPatternEqualSubset
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ pa
|
|
|
|
@TYPE2@ const FcPattern * @ARG2@ pb
|
|
|
|
@TYPE3@ const FcObjectSet * @ARG3@ os
|
|
|
|
@PURPOSE@ Compare portions of patterns
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
2003-03-07 09:51:14 +01:00
|
|
|
Returns whether <parameter>pa</parameter> and <parameter>pb</parameter> have exactly the same values for all of the
|
|
|
|
objects in <parameter>os</parameter>.
|
2003-03-07 08:12:51 +01:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcPattern *
|
|
|
|
@FUNC@ FcPatternFilter
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ const FcObjectSet * @ARG2@ os
|
|
|
|
@PURPOSE@ Filter the objects of pattern
|
2008-08-13 08:50:35 +02:00
|
|
|
@DESC@
|
|
|
|
Returns a new pattern that only has those objects from
|
|
|
|
<parameter>p</parameter> that are in <parameter>os</parameter>.
|
|
|
|
If <parameter>os</parameter> is NULL, a duplicate of
|
|
|
|
<parameter>p</parameter> is returned.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcChar32
|
|
|
|
@FUNC@ FcPatternHash
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ p
|
|
|
|
@PURPOSE@ Compute a pattern hash value
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
|
|
|
Returns a 32-bit number which is the same for any two patterns which are
|
|
|
|
equal.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcPatternAdd
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ const char * @ARG2@ object
|
|
|
|
@TYPE3@ FcValue% @ARG3@ value
|
|
|
|
@TYPE4@ FcBool% @ARG4@ append
|
|
|
|
@PURPOSE@ Add a value to a pattern
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
|
|
|
Adds a single value to the list of values associated with the property named
|
2003-03-07 09:51:14 +01:00
|
|
|
`object<parameter>. If `append</parameter> is FcTrue, the value is added at the end of any
|
2011-03-11 23:43:42 +01:00
|
|
|
existing list, otherwise it is inserted at the beginning. `value' is saved
|
2003-03-07 08:12:51 +01:00
|
|
|
(with FcValueSave) when inserted into the pattern so that the library
|
|
|
|
retains no reference to any application-supplied data structure.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcPatternAddWeak
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ const char * @ARG2@ object
|
|
|
|
@TYPE3@ FcValue% @ARG3@ value
|
|
|
|
@TYPE4@ FcBool% @ARG4@ append
|
|
|
|
@PURPOSE@ Add a value to a pattern with weak binding
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
|
|
|
FcPatternAddWeak is essentially the same as FcPatternAdd except that any
|
2003-03-07 09:51:14 +01:00
|
|
|
values added to the list have binding <parameter>weak</parameter> instead of <parameter>strong</parameter>.
|
2003-03-07 08:12:51 +01:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@TITLE@ FcPatternAdd-Type
|
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcPatternAddInteger
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ const char * @ARG2@ object
|
|
|
|
@TYPE3@ int% @ARG3@ i
|
2003-03-07 08:12:51 +01:00
|
|
|
|
|
|
|
@PROTOTYPE+@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET+@ FcBool
|
|
|
|
@FUNC+@ FcPatternAddDouble
|
|
|
|
@TYPE1+@ FcPattern * @ARG1+@ p
|
|
|
|
@TYPE2+@ const char * @ARG2+@ object
|
|
|
|
@TYPE3+@ double% @ARG3+@ d
|
2003-03-07 08:12:51 +01:00
|
|
|
|
|
|
|
@PROTOTYPE++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET++@ FcBool
|
|
|
|
@FUNC++@ FcPatternAddString
|
|
|
|
@TYPE1++@ FcPattern * @ARG1++@ p
|
|
|
|
@TYPE2++@ const char * @ARG2++@ object
|
|
|
|
@TYPE3++@ const FcChar8 * @ARG3++@ s
|
2003-03-07 08:12:51 +01:00
|
|
|
|
|
|
|
@PROTOTYPE+++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET+++@ FcBool
|
|
|
|
@FUNC+++@ FcPatternAddMatrix
|
|
|
|
@TYPE1+++@ FcPattern * @ARG1+++@ p
|
|
|
|
@TYPE2+++@ const char * @ARG2+++@ object
|
|
|
|
@TYPE3+++@ const FcMatrix * @ARG3+++@ m
|
2003-03-07 08:12:51 +01:00
|
|
|
|
|
|
|
@PROTOTYPE++++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET++++@ FcBool
|
|
|
|
@FUNC++++@ FcPatternAddCharSet
|
|
|
|
@TYPE1++++@ FcPattern * @ARG1++++@ p
|
|
|
|
@TYPE2++++@ const char * @ARG2++++@ object
|
|
|
|
@TYPE3++++@ const FcCharSet * @ARG3++++@ c
|
2003-03-07 08:12:51 +01:00
|
|
|
|
|
|
|
@PROTOTYPE+++++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET+++++@ FcBool
|
|
|
|
@FUNC+++++@ FcPatternAddBool
|
|
|
|
@TYPE1+++++@ FcPattern * @ARG1+++++@ p
|
|
|
|
@TYPE2+++++@ const char * @ARG2+++++@ object
|
|
|
|
@TYPE3+++++@ FcBool% @ARG3+++++@ b
|
2007-11-04 06:23:28 +01:00
|
|
|
|
|
|
|
@PROTOTYPE++++++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET++++++@ FcBool
|
|
|
|
@FUNC++++++@ FcPatternAddFTFace
|
|
|
|
@TYPE1++++++@ FcPattern * @ARG1++++++@ p
|
|
|
|
@TYPE2++++++@ const char * @ARG2++++++@ object
|
|
|
|
@TYPE3++++++@ const FT_Face @ARG3++++++@ f
|
2007-11-04 06:23:28 +01:00
|
|
|
|
|
|
|
@PROTOTYPE+++++++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET+++++++@ FcBool
|
|
|
|
@FUNC+++++++@ FcPatternAddLangSet
|
|
|
|
@TYPE1+++++++@ FcPattern * @ARG1+++++++@ p
|
|
|
|
@TYPE2+++++++@ const char * @ARG2+++++++@ object
|
|
|
|
@TYPE3+++++++@ const FcLangSet * @ARG3+++++++@ l
|
2007-11-04 06:23:28 +01:00
|
|
|
|
2014-03-26 08:01:49 +01:00
|
|
|
@PROTOTYPE++++++++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET++++++++@ FcBool
|
|
|
|
@FUNC++++++++@ FcPatternAddRange
|
|
|
|
@TYPE1++++++++@ FcPattern * @ARG1++++++++@ p
|
|
|
|
@TYPE2++++++++@ const char * @ARG2++++++++@ object
|
|
|
|
@TYPE3++++++++@ const FcRange * @ARG3++++++++@ r
|
2014-03-26 08:01:49 +01:00
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@PURPOSE@ Add a typed value to a pattern
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
|
|
|
These are all convenience functions that insert objects of the specified
|
|
|
|
type into the pattern. Use these in preference to FcPatternAdd as they
|
|
|
|
will provide compile-time typechecking. These all append values to
|
|
|
|
any existing list of values.
|
2014-03-26 08:01:49 +01:00
|
|
|
|
|
|
|
<function>FcPatternAddRange</function> are available since 2.11.91.
|
2003-03-07 08:12:51 +01:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcResult
|
|
|
|
@FUNC@ FcPatternGetWithBinding
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ const char * @ARG2@ object
|
|
|
|
@TYPE3@ int% @ARG3@ id
|
|
|
|
@TYPE4@ FcValue * @ARG4@ v
|
|
|
|
@TYPE5@ FcValueBinding * @ARG5@ b
|
|
|
|
@PURPOSE@ Return a value with binding from a pattern
|
2015-07-28 05:48:40 +02:00
|
|
|
@DESC@
|
|
|
|
Returns in <parameter>v</parameter> the <parameter>id</parameter>'th value
|
|
|
|
and <parameter>b</parameter> binding for that associated with the property
|
|
|
|
<parameter>object</parameter>.
|
|
|
|
The Value returned is not a copy, but rather refers to the data stored
|
|
|
|
within the pattern directly. Applications must not free this value.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.12.5
|
2015-07-28 05:48:40 +02:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcResult
|
|
|
|
@FUNC@ FcPatternGet
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ const char * @ARG2@ object
|
|
|
|
@TYPE3@ int% @ARG3@ id
|
|
|
|
@TYPE4@ FcValue * @ARG4@ v
|
|
|
|
@PURPOSE@ Return a value from a pattern
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
2005-03-01 21:36:48 +01:00
|
|
|
Returns in <parameter>v</parameter> the <parameter>id</parameter>'th value
|
|
|
|
associated with the property <parameter>object</parameter>.
|
2003-03-07 08:12:51 +01:00
|
|
|
The value returned is not a copy, but rather refers to the data stored
|
|
|
|
within the pattern directly. Applications must not free this value.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@TITLE@ FcPatternGet-Type
|
2003-03-07 08:12:51 +01:00
|
|
|
@PROTOTYPE@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcResult
|
|
|
|
@FUNC@ FcPatternGetInteger
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ const char * @ARG2@ object
|
|
|
|
@TYPE3@ int% @ARG3@ n
|
|
|
|
@TYPE4@ int * @ARG4@ i
|
2003-03-07 08:12:51 +01:00
|
|
|
|
|
|
|
@PROTOTYPE+@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET+@ FcResult
|
|
|
|
@FUNC+@ FcPatternGetDouble
|
|
|
|
@TYPE1+@ FcPattern * @ARG1+@ p
|
|
|
|
@TYPE2+@ const char * @ARG2+@ object
|
|
|
|
@TYPE3+@ int% @ARG3+@ n
|
|
|
|
@TYPE4+@ double * @ARG4+@ d
|
2003-03-07 08:12:51 +01:00
|
|
|
|
|
|
|
@PROTOTYPE++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET++@ FcResult
|
|
|
|
@FUNC++@ FcPatternGetString
|
|
|
|
@TYPE1++@ FcPattern * @ARG1++@ p
|
|
|
|
@TYPE2++@ const char * @ARG2++@ object
|
|
|
|
@TYPE3++@ int% @ARG3++@ n
|
|
|
|
@TYPE4++@ FcChar8 ** @ARG4++@ s
|
2003-03-07 08:12:51 +01:00
|
|
|
|
|
|
|
@PROTOTYPE+++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET+++@ FcResult
|
|
|
|
@FUNC+++@ FcPatternGetMatrix
|
|
|
|
@TYPE1+++@ FcPattern * @ARG1+++@ p
|
|
|
|
@TYPE2+++@ const char * @ARG2+++@ object
|
|
|
|
@TYPE3+++@ int% @ARG3+++@ n
|
|
|
|
@TYPE4+++@ FcMatrix ** @ARG4+++@ s
|
2003-03-07 08:12:51 +01:00
|
|
|
|
|
|
|
@PROTOTYPE++++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET++++@ FcResult
|
|
|
|
@FUNC++++@ FcPatternGetCharSet
|
|
|
|
@TYPE1++++@ FcPattern * @ARG1++++@ p
|
|
|
|
@TYPE2++++@ const char * @ARG2++++@ object
|
|
|
|
@TYPE3++++@ int% @ARG3++++@ n
|
|
|
|
@TYPE4++++@ FcCharSet ** @ARG4++++@ c
|
2003-03-07 08:12:51 +01:00
|
|
|
|
|
|
|
@PROTOTYPE+++++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET+++++@ FcResult
|
|
|
|
@FUNC+++++@ FcPatternGetBool
|
|
|
|
@TYPE1+++++@ FcPattern * @ARG1+++++@ p
|
|
|
|
@TYPE2+++++@ const char * @ARG2+++++@ object
|
|
|
|
@TYPE3+++++@ int% @ARG3+++++@ n
|
|
|
|
@TYPE4+++++@ FcBool * @ARG4+++++@ b
|
2007-11-04 06:23:28 +01:00
|
|
|
|
|
|
|
@PROTOTYPE++++++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET++++++@ FcResult
|
|
|
|
@FUNC++++++@ FcPatternGetFTFace
|
|
|
|
@TYPE1++++++@ FcPattern * @ARG1++++++@ p
|
|
|
|
@TYPE2++++++@ const char * @ARG2++++++@ object
|
|
|
|
@TYPE3++++++@ int% @ARG3++++++@ n
|
|
|
|
@TYPE4++++++@ FT_Face * @ARG4++++++@ f
|
2007-11-04 06:23:28 +01:00
|
|
|
|
|
|
|
@PROTOTYPE+++++++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET+++++++@ FcResult
|
|
|
|
@FUNC+++++++@ FcPatternGetLangSet
|
|
|
|
@TYPE1+++++++@ FcPattern * @ARG1+++++++@ p
|
|
|
|
@TYPE2+++++++@ const char * @ARG2+++++++@ object
|
|
|
|
@TYPE3+++++++@ int% @ARG3+++++++@ n
|
|
|
|
@TYPE4+++++++@ FcLangSet ** @ARG4+++++++@ l
|
2014-03-26 08:01:49 +01:00
|
|
|
|
|
|
|
@PROTOTYPE++++++++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET++++++++@ FcResult
|
|
|
|
@FUNC++++++++@ FcPatternGetRange
|
|
|
|
@TYPE1++++++++@ FcPattern * @ARG1++++++++@ p
|
|
|
|
@TYPE2++++++++@ const char * @ARG2++++++++@ object
|
|
|
|
@TYPE3++++++++@ int% @ARG3++++++++@ n
|
|
|
|
@TYPE4++++++++@ FcRange ** @ARG4++++++++@ r
|
|
|
|
|
|
|
|
@PURPOSE@ Return a typed value from a pattern
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
|
|
|
These are convenience functions that call FcPatternGet and verify that the
|
|
|
|
returned data is of the expected type. They return FcResultTypeMismatch if
|
|
|
|
this is not the case. Note that these (like FcPatternGet) do not make a
|
|
|
|
copy of any data structure referenced by the return value. Use these
|
|
|
|
in preference to FcPatternGet to provide compile-time typechecking.
|
2014-03-26 08:01:49 +01:00
|
|
|
|
|
|
|
<function>FcPatternGetRange</function> are available since 2.11.91.
|
2003-03-07 08:12:51 +01:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcPattern *
|
|
|
|
@FUNC@ FcPatternBuild
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ pattern
|
|
|
|
@TYPE2@ ...
|
2003-03-07 08:12:51 +01:00
|
|
|
|
|
|
|
@PROTOTYPE+@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET+@ FcPattern *
|
|
|
|
@FUNC+@ FcPatternVaBuild
|
|
|
|
@TYPE1+@ FcPattern * @ARG1+@ pattern
|
|
|
|
@TYPE2+@ va_list% @ARG2+@ va
|
2007-11-14 00:48:30 +01:00
|
|
|
|
|
|
|
@PROTOTYPE++@
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET++@ void
|
|
|
|
@FUNC++@ FcPatternVapBuild
|
|
|
|
@TYPE1++@ FcPattern * @ARG1++@ result
|
|
|
|
@TYPE2++@ FcPattern * @ARG2++@ pattern
|
|
|
|
@TYPE3++@ va_list% @ARG3++@ va
|
2007-11-14 00:48:30 +01:00
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@PURPOSE@ Create patterns from arguments
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
|
|
|
Builds a pattern using a list of objects, types and values. Each
|
|
|
|
value to be entered in the pattern is specified with three arguments:
|
2003-04-23 06:09:28 +02:00
|
|
|
</para>
|
2003-03-07 08:12:51 +01:00
|
|
|
<orderedlist>
|
|
|
|
<listitem><para>
|
|
|
|
Object name, a string describing the property to be added.
|
|
|
|
</para></listitem><listitem><para>
|
|
|
|
Object type, one of the FcType enumerated values
|
|
|
|
</para></listitem><listitem><para>
|
|
|
|
Value, not an FcValue, but the raw type as passed to any of the
|
|
|
|
FcPatternAdd<type> functions. Must match the type of the second
|
|
|
|
argument.
|
|
|
|
</para></listitem>
|
|
|
|
</orderedlist>
|
|
|
|
<para>
|
|
|
|
The argument list is terminated by a null object name, no object type nor
|
|
|
|
value need be passed for this. The values are added to `pattern', if
|
|
|
|
`pattern' is null, a new pattern is created. In either case, the pattern is
|
|
|
|
returned. Example
|
|
|
|
</para>
|
|
|
|
<programlisting>
|
2006-01-30 05:51:22 +01:00
|
|
|
pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Times", (char *) 0);
|
2003-03-07 08:12:51 +01:00
|
|
|
</programlisting>
|
|
|
|
<para>
|
|
|
|
FcPatternVaBuild is used when the arguments are already in the form of a
|
2007-11-14 00:48:30 +01:00
|
|
|
varargs value. FcPatternVapBuild is a macro version of FcPatternVaBuild
|
|
|
|
which returns its result directly in the <parameter>result</parameter>
|
|
|
|
variable.
|
2003-03-07 08:12:51 +01:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcPatternDel
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ const char * @ARG2@ object
|
|
|
|
@PURPOSE@ Delete a property from a pattern
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
2022-12-13 08:05:41 +01:00
|
|
|
Deletes all values associated with the property `object', returning
|
2003-03-07 08:12:51 +01:00
|
|
|
whether the property existed or not.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcPatternRemove
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ const char * @ARG2@ object
|
|
|
|
@TYPE3@ int% @ARG3@ id
|
|
|
|
@PURPOSE@ Remove one object of the specified type from the pattern
|
2004-12-04 20:41:10 +01:00
|
|
|
@DESC@
|
2022-12-13 08:05:41 +01:00
|
|
|
Removes the value associated with the property `object' at position `id', returning
|
2004-12-04 20:41:10 +01:00
|
|
|
whether the property existed and had a value at that position or not.
|
|
|
|
@@
|
2018-05-11 13:48:30 +02:00
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ void
|
|
|
|
@FUNC@ FcPatternIterStart
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ FcPatternIter * @ARG2@ iter
|
|
|
|
@PURPOSE@ Initialize the iterator with the first iterator in the pattern
|
2018-05-11 13:48:30 +02:00
|
|
|
@DESC@
|
|
|
|
Initialize <parameter>iter</parameter> with the first iterator in <parameter>p</parameter>.
|
|
|
|
If there are no objects in <parameter>p</parameter>, <parameter>iter</parameter>
|
|
|
|
will not have any valid data.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.13.1
|
2018-05-11 13:48:30 +02:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcPatternIterNext
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ FcPatternIter * @ARG2@ iter
|
|
|
|
@PURPUSE@ Set the iterator to point to the next object in the pattern
|
2018-05-11 13:48:30 +02:00
|
|
|
@DESC@
|
|
|
|
Set <parameter>iter</parameter> to point to the next object in <parameter>p</parameter>
|
|
|
|
and returns FcTrue if <parameter>iter</parameter> has been changed to the next object.
|
|
|
|
returns FcFalse otherwise.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.13.1
|
2018-05-11 13:48:30 +02:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcPatternIterEqual
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ p1
|
|
|
|
@TYPE2@ FcPatternIter * @ARG2@ i1
|
|
|
|
@TYPE3@ const FcPattern * @ARG3@ p2
|
|
|
|
@TYPE4@ FcPatternIter * @ARG4@ i2
|
|
|
|
@PURPOSE@ Compare iterators
|
2018-05-11 13:48:30 +02:00
|
|
|
@DESC@
|
|
|
|
Return FcTrue if both <parameter>i1</parameter> and <parameter>i2</parameter>
|
|
|
|
point to same object and contains same values. return FcFalse otherwise.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.13.1
|
2018-05-11 13:48:30 +02:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcPatternFindIter
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ FcPatternIter * @ARG2@ iter
|
|
|
|
@TYPE3@ const char * @ARG3@ object
|
|
|
|
@PURPOSE@ Set the iterator to point to the object in the pattern
|
2018-05-11 13:48:30 +02:00
|
|
|
@DESC@
|
|
|
|
Set <parameter>iter</parameter> to point to <parameter>object</parameter> in
|
|
|
|
<parameter>p</parameter> if any and returns FcTrue. returns FcFalse otherwise.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.13.1
|
2018-05-11 13:48:30 +02:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcPatternIterIsValid
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ FcPatternIter : @ARG2@ iter
|
|
|
|
@PURPOSE@ Check whether the iterator is valid or not
|
2018-05-11 13:48:30 +02:00
|
|
|
@DESC@
|
|
|
|
Returns FcTrue if <parameter>iter</parameter> point to the valid entry
|
|
|
|
in <parameter>p</parameter>. returns FcFalse otherwise.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.13.1
|
2018-05-11 13:48:30 +02:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ const char *
|
|
|
|
@FUNC@ FcPatternIterGetObject
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ FcPatternIter * @ARG2@ iter
|
|
|
|
@PURPOSE@ Returns an object name which the iterator point to
|
2018-05-11 13:48:30 +02:00
|
|
|
@DESC@
|
|
|
|
Returns an object name in <parameter>p</parameter> which
|
|
|
|
<parameter>iter</parameter> point to. returns NULL if
|
|
|
|
<parameter>iter</parameter> isn't valid.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.13.1
|
2018-05-11 13:48:30 +02:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ int
|
|
|
|
@FUNC@ FcPatternIterValueCount
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ FcPatternIter * @ARG2@ iter
|
|
|
|
@PURPOSE@ Returns the number of the values which the iterator point to
|
2018-05-11 13:48:30 +02:00
|
|
|
@DESC@
|
|
|
|
Returns the number of the values in the object which <parameter>iter</parameter>
|
|
|
|
point to. if <parameter>iter</parameter> isn't valid, returns 0.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.13.1
|
2018-05-11 13:48:30 +02:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcResult
|
|
|
|
@FUNC@ FcPatternIterGetValue
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ p
|
|
|
|
@TYPE2@ FcPatternIter * @ARG2@ iter
|
|
|
|
@TYPE3@ int @ARG3@ id
|
|
|
|
@TYPE4@ FcValue * @ARG4@ v
|
|
|
|
@TYPE5@ FcValueBinding * @ARG5@ b
|
|
|
|
@PURPOSE@ Returns a value which the iterator point to
|
2018-05-11 13:48:30 +02:00
|
|
|
@DESC@
|
|
|
|
Returns in <parameter>v</parameter> the <parameter>id</parameter>'th value
|
|
|
|
which <parameter>iter</parameter> point to. also binding to <parameter>b</parameter>
|
|
|
|
if given.
|
|
|
|
The value returned is not a copy, but rather refers to the data stored
|
|
|
|
within the pattern directly. Applications must not free this value.
|
2022-12-13 08:05:41 +01:00
|
|
|
@SINCE@ 2.13.1
|
2018-05-11 13:48:30 +02:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ void
|
|
|
|
@FUNC@ FcPatternPrint
|
|
|
|
@TYPE1@ const FcPattern * @ARG1@ p
|
|
|
|
@PURPOSE@ Print a pattern for debugging
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
|
|
|
Prints an easily readable version of the pattern to stdout. There is
|
|
|
|
no provision for reparsing data in this format, it's just for diagnostics
|
|
|
|
and debugging.
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ void
|
|
|
|
@FUNC@ FcDefaultSubstitute
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ pattern
|
|
|
|
@PURPOSE@ Perform default substitutions in a pattern
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
|
|
|
Supplies default values for underspecified font patterns:
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem><para>
|
|
|
|
Patterns without a specified style or weight are set to Medium
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
Patterns without a specified style or slant are set to Roman
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
Patterns without a specified pixel size are given one computed from any
|
|
|
|
specified point size (default 12), dpi (default 75) and scale (default 1).
|
|
|
|
</para></listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcPattern *
|
|
|
|
@FUNC@ FcNameParse
|
|
|
|
@TYPE1@ const FcChar8 * @ARG1@ name
|
|
|
|
@PURPOSE@ Parse a pattern string
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
2003-03-07 09:51:14 +01:00
|
|
|
Converts <parameter>name</parameter> from the standard text format described above into a pattern.
|
2003-03-07 08:12:51 +01:00
|
|
|
@@
|
|
|
|
|
2022-12-13 08:05:41 +01:00
|
|
|
@RET@ FcChar8 *
|
|
|
|
@FUNC@ FcNameUnparse
|
|
|
|
@TYPE1@ FcPattern * @ARG1@ pat
|
|
|
|
@PURPOSE@ Convert a pattern back into a string that can be parsed
|
2003-03-07 08:12:51 +01:00
|
|
|
@DESC@
|
|
|
|
Converts the given pattern into the standard text format described above.
|
|
|
|
The return value is not static, but instead refers to newly allocated memory
|
2008-08-23 00:25:22 +02:00
|
|
|
which should be freed by the caller using free().
|
2003-03-07 08:12:51 +01:00
|
|
|
@@
|