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.

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.

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:

1. Object name, a string describing the property to be added.

2. Object type, one of the FcType enumerated values

3. 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.

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().