FcPatternCreate
3
Fontconfig &version;
FcPatternCreate
Create a pattern
#include <fontconfig/fontconfig.h>
FcPattern * FcPatternCreate
void
Description
Creates a pattern with no properties; used to build patterns from scratch.
FcPatternDuplicate
3
Fontconfig &version;
FcPatternDuplicate
Copy a pattern
#include <fontconfig/fontconfig.h>
FcPattern * FcPatternDuplicate
const FcPattern *p
Description
Copy a pattern, returning a new pattern that matches
p. Each pattern may be modified without affecting the
other.
FcPatternReference
3
Fontconfig &version;
FcPatternReference
Increment pattern reference count
#include <fontconfig/fontconfig.h>
void FcPatternReference
FcPattern *p
Description
Add another reference to p. Patterns are freed only
when the reference count reaches zero.
FcPatternDestroy
3
Fontconfig &version;
FcPatternDestroy
Destroy a pattern
#include <fontconfig/fontconfig.h>
void FcPatternDestroy
FcPattern *p
Description
Decrement the pattern reference count. If all references are gone, destroys
the pattern, in the process destroying all related values.
FcPatternObjectCount
3
Fontconfig &version;
FcPatternObjectCount
Returns the number of the object
#include <fontconfig/fontconfig.h>
int FcPatternObjectCount
const FcPattern *p
Description
Returns the number of the object p has.
Since
version 2.13.1
FcPatternEqual
3
Fontconfig &version;
FcPatternEqual
Compare patterns
#include <fontconfig/fontconfig.h>
FcBool FcPatternEqual
const FcPattern *pa
const FcPattern *pb
Description
Returns whether pa and pb are exactly alike.
FcPatternEqualSubset
3
Fontconfig &version;
FcPatternEqualSubset
Compare portions of patterns
#include <fontconfig/fontconfig.h>
FcBool FcPatternEqualSubset
const FcPattern *pa
const FcPattern *pb
const FcObjectSet *os
Description
Returns whether pa and pb have exactly the same values for all of the
objects in os.
FcPatternFilter
3
Fontconfig &version;
FcPatternFilter
Filter the objects of pattern
#include <fontconfig/fontconfig.h>
FcPattern * FcPatternFilter
FcPattern *p
const FcObjectSet *
Description
Returns a new pattern that only has those objects from
p that are in os.
If os is NULL, a duplicate of
p is returned.
FcPatternHash
3
Fontconfig &version;
FcPatternHash
Compute a pattern hash value
#include <fontconfig/fontconfig.h>
FcChar32 FcPatternHash
const FcPattern *p
Description
Returns a 32-bit number which is the same for any two patterns which are
equal.
FcPatternAdd
3
Fontconfig &version;
FcPatternAdd
Add a value to a pattern
#include <fontconfig/fontconfig.h>
FcBool FcPatternAdd
FcPattern *p
const char *object
FcValue value
FcBool append
Description
Adds a single value to the list of values associated with the property named
`object. If `append is FcTrue, the value is added at the end of any
existing list, otherwise it is inserted at the beginning. `value' is saved
(with FcValueSave) when inserted into the pattern so that the library
retains no reference to any application-supplied data structure.
FcPatternAddWeak
3
Fontconfig &version;
FcPatternAddWeak
Add a value to a pattern with weak binding
#include <fontconfig/fontconfig.h>
FcBool FcPatternAddWeak
FcPattern *p
const char *object
FcValue value
FcBool append
Description
FcPatternAddWeak is essentially the same as FcPatternAdd except that any
values added to the list have binding weak instead of strong.
FcPatternAdd-Type
3
Fontconfig &version;
FcPatternAddInteger
FcPatternAddDouble
FcPatternAddString
FcPatternAddMatrix
FcPatternAddCharSet
FcPatternAddBool
FcPatternAddFTFace
FcPatternAddLangSet
FcPatternAddRange
Add a typed value to a pattern
#include <fontconfig/fontconfig.h>
FcBool FcPatternAddInteger
FcPattern *p
const char *object
int i
FcBool FcPatternAddDouble
FcPattern *p
const char *object
double d
FcBool FcPatternAddString
FcPattern *p
const char *object
const FcChar8 *s
FcBool FcPatternAddMatrix
FcPattern *p
const char *object
const FcMatrix *m
FcBool FcPatternAddCharSet
FcPattern *p
const char *object
const FcCharSet *c
FcBool FcPatternAddBool
FcPattern *p
const char *object
FcBool b
FcBool FcPatternAddFTFace
FcPattern *p
const char *object
const FT_Facef
FcBool FcPatternAddLangSet
FcPattern *p
const char *object
const FcLangSet *l
FcBool FcPatternAddRange
FcPattern *p
const char *object
const FcRange *r
Description
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.
FcPatternAddRange are available since 2.11.91.
FcPatternGetWithBinding
3
Fontconfig &version;
FcPatternGetWithBinding
Return a value with binding from a pattern
#include <fontconfig/fontconfig.h>
FcResult FcPatternGetWithBinding
FcPattern *p
const char *object
int id
FcValue *v
FcValueBinding *b
Description
Returns in v the id'th value
and b binding for that associated with the property
object.
The Value returned is not a copy, but rather refers to the data stored
within the pattern directly. Applications must not free this value.
Since
version 2.12.5
FcPatternGet
3
Fontconfig &version;
FcPatternGet
Return a value from a pattern
#include <fontconfig/fontconfig.h>
FcResult FcPatternGet
FcPattern *p
const char *object
int id
FcValue *v
Description
Returns in v the id'th value
associated with the property object.
The value returned is not a copy, but rather refers to the data stored
within the pattern directly. Applications must not free this value.
FcPatternGet-Type
3
Fontconfig &version;
FcPatternGetInteger
FcPatternGetDouble
FcPatternGetString
FcPatternGetMatrix
FcPatternGetCharSet
FcPatternGetBool
FcPatternGetFTFace
FcPatternGetLangSet
FcPatternGetRange
Return a typed value from a pattern
#include <fontconfig/fontconfig.h>
FcResult FcPatternGetInteger
FcPattern *p
const char *object
int n
int *i
FcResult FcPatternGetDouble
FcPattern *p
const char *object
int n
double *d
FcResult FcPatternGetString
FcPattern *p
const char *object
int n
FcChar8 **s
FcResult FcPatternGetMatrix
FcPattern *p
const char *object
int n
FcMatrix **s
FcResult FcPatternGetCharSet
FcPattern *p
const char *object
int n
FcCharSet **c
FcResult FcPatternGetBool
FcPattern *p
const char *object
int n
FcBool *b
FcResult FcPatternGetFTFace
FcPattern *p
const char *object
int n
FT_Face *f
FcResult FcPatternGetLangSet
FcPattern *p
const char *object
int n
FcLangSet **l
FcResult FcPatternGetRange
FcPattern *p
const char *object
int n
FcRange **r
Description
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.
FcPatternGetRange are available since 2.11.91.
FcPatternBuild
3
Fontconfig &version;
FcPatternBuild
FcPatternVaBuild
FcPatternVapBuild
Create patterns from arguments
#include <fontconfig/fontconfig.h>
FcPattern * FcPatternBuild
FcPattern *pattern
...
FcPattern * FcPatternVaBuild
FcPattern *pattern
va_list va
void FcPatternVapBuild
FcPattern *result
FcPattern *pattern
va_list va
Description
Builds a pattern using a list of objects, types and values. Each
value to be entered in the pattern is specified with three arguments:
Object name, a string describing the property to be added.
Object type, one of the FcType enumerated values
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.
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
pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Times", (char *) 0);
FcPatternVaBuild is used when the arguments are already in the form of a
varargs value. FcPatternVapBuild is a macro version of FcPatternVaBuild
which returns its result directly in the result
variable.
FcPatternDel
3
Fontconfig &version;
FcPatternDel
Delete a property from a pattern
#include <fontconfig/fontconfig.h>
FcBool FcPatternDel
FcPattern *p
const char *object
Description
Deletes all values associated with the property `object', returning
whether the property existed or not.
FcPatternRemove
3
Fontconfig &version;
FcPatternRemove
Remove one object of the specified type from the pattern
#include <fontconfig/fontconfig.h>
FcBool FcPatternRemove
FcPattern *p
const char *object
int id
Description
Removes the value associated with the property `object' at position `id', returning
whether the property existed and had a value at that position or not.
FcPatternIterStart
3
Fontconfig &version;
FcPatternIterStart
Initialize the iterator with the first iterator in the pattern
#include <fontconfig/fontconfig.h>
void FcPatternIterStart
const FcPattern *p
FcPatternIter *iter
Description
Initialize iter with the first iterator in p.
If there are no objects in p, iter
will not have any valid data.
Since
version 2.13.1
FcPatternIterNext
3
Fontconfig &version;
FcPatternIterNext
#include <fontconfig/fontconfig.h>
FcBool FcPatternIterNext
const FcPattern *p
FcPatternIter *iter
Description
Set iter to point to the next object in p
and returns FcTrue if iter has been changed to the next object.
returns FcFalse otherwise.
Since
version 2.13.1
FcPatternIterEqual
3
Fontconfig &version;
FcPatternIterEqual
Compare iterators
#include <fontconfig/fontconfig.h>
FcBool FcPatternIterEqual
const FcPattern *p1
FcPatternIter *i1
const FcPattern *p2
FcPatternIter *i2
Description
Return FcTrue if both i1 and i2
point to same object and contains same values. return FcFalse otherwise.
Since
version 2.13.1
FcPatternFindIter
3
Fontconfig &version;
FcPatternFindIter
Set the iterator to point to the object in the pattern
#include <fontconfig/fontconfig.h>
FcBool FcPatternFindIter
const FcPattern *p
FcPatternIter *iter
const char *object
Description
Set iter to point to object in
p if any and returns FcTrue. returns FcFalse otherwise.
Since
version 2.13.1
FcPatternIterIsValid
3
Fontconfig &version;
FcPatternIterIsValid
Check whether the iterator is valid or not
#include <fontconfig/fontconfig.h>
FcBool FcPatternIterIsValid
const FcPattern *p
FcPatternIter :iter
Description
Returns FcTrue if iter point to the valid entry
in p. returns FcFalse otherwise.
Since
version 2.13.1
FcPatternIterGetObject
3
Fontconfig &version;
FcPatternIterGetObject
Returns an object name which the iterator point to
#include <fontconfig/fontconfig.h>
const char * FcPatternIterGetObject
const FcPattern *p
FcPatternIter *iter
Description
Returns an object name in p which
iter point to. returns NULL if
iter isn't valid.
Since
version 2.13.1
FcPatternIterValueCount
3
Fontconfig &version;
FcPatternIterValueCount
Returns the number of the values which the iterator point to
#include <fontconfig/fontconfig.h>
int FcPatternIterValueCount
const FcPattern *p
FcPatternIter *iter
Description
Returns the number of the values in the object which iter
point to. if iter isn't valid, returns 0.
Since
version 2.13.1
FcPatternIterGetValue
3
Fontconfig &version;
FcPatternIterGetValue
Returns a value which the iterator point to
#include <fontconfig/fontconfig.h>
FcResult FcPatternIterGetValue
const FcPattern *p
FcPatternIter *iter
intid
FcValue *v
FcValueBinding *b
Description
Returns in v the id'th value
which iter point to. also binding to b
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.
Since
version 2.13.1
FcPatternPrint
3
Fontconfig &version;
FcPatternPrint
Print a pattern for debugging
#include <fontconfig/fontconfig.h>
void FcPatternPrint
const FcPattern *p
Description
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.
FcDefaultSubstitute
3
Fontconfig &version;
FcDefaultSubstitute
Perform default substitutions in a pattern
#include <fontconfig/fontconfig.h>
void FcDefaultSubstitute
FcPattern *pattern
Description
Supplies default values for underspecified font patterns:
Patterns without a specified style or weight are set to Medium
Patterns without a specified style or slant are set to Roman
Patterns without a specified pixel size are given one computed from any
specified point size (default 12), dpi (default 75) and scale (default 1).
FcNameParse
3
Fontconfig &version;
FcNameParse
Parse a pattern string
#include <fontconfig/fontconfig.h>
FcPattern * FcNameParse
const FcChar8 *name
Description
Converts name from the standard text format described above into a pattern.
FcNameUnparse
3
Fontconfig &version;
FcNameUnparse
Convert a pattern back into a string that can be parsed
#include <fontconfig/fontconfig.h>
FcChar8 * FcNameUnparse
FcPattern *pat
Description
Converts the given pattern into the standard text format described above.
The return value is not static, but instead refers to newly allocated memory
which should be freed by the caller using free().