1 Fontconfig Developers Reference, Version 2.10.91
3 Copyright © 2002 Keith Packard
5 Permission to use, copy, modify, distribute, and sell this software and
6 its documentation for any purpose is hereby granted without fee, provided
7 that the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
9 documentation, and that the name of the author(s) not be used in
10 advertising or publicity pertaining to distribution of the software
11 without specific, written prior permission. The authors make no
12 representations about the suitability of this software for any purpose. It
13 is provided "as is" without express or implied warranty.
15 THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
17 EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
19 USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
20 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21 PERFORMANCE OF THIS SOFTWARE.
23 -------------------------------------------------------
29 [2]FUNCTIONAL OVERVIEW
37 Fontconfig is a library designed to provide system-wide font
38 configuration, customization and application access.
40 --------------------------------------------------------------------------
44 Fontconfig contains two essential modules, the configuration module which
45 builds an internal configuration from XML files and the matching module
46 which accepts font patterns and returns the nearest matching font.
48 --------------------------------------------------------------------------
52 The configuration module consists of the FcConfig datatype, libexpat and
53 FcConfigParse which walks over an XML tree and amends a configuration with
54 data found within. From an external perspective, configuration of the
55 library consists of generating a valid XML tree and feeding that to
56 FcConfigParse. The only other mechanism provided to applications for
57 changing the running configuration is to add fonts and directories to the
58 list of application-provided font files.
60 The intent is to make font configurations relatively static, and shared by
61 as many applications as possible. It is hoped that this will lead to more
62 stable font selection when passing names from one application to another.
63 XML was chosen as a configuration file format because it provides a format
64 which is easy for external agents to edit while retaining the correct
67 Font configuration is separate from font matching; applications needing to
68 do their own matching can access the available fonts from the library and
69 perform private matching. The intent is to permit applications to pick and
70 choose appropriate functionality from the library instead of forcing them
71 to choose between this library and a private configuration mechanism. The
72 hope is that this will ensure that configuration of fonts for all
73 applications can be centralized in one place. Centralizing font
74 configuration will simplify and regularize font installation and
77 --------------------------------------------------------------------------
81 While font patterns may contain essentially any properties, there are some
82 well known properties with associated types. Fontconfig uses some of these
83 properties for font matching and font completion. Others are provided as a
84 convenience for the application's rendering mechanism.
88 Property C Preprocessor Symbol Type Description
89 ----------------------------------------------------
90 family FC_FAMILY String Font family names
91 familylang FC_FAMILYLANG String Language corresponding to
93 style FC_STYLE String Font style. Overrides weight
95 stylelang FC_STYLELANG String Language corresponding to
97 fullname FC_FULLNAME String Font face full name where
98 different from family and
100 fullnamelang FC_FULLNAMELANG String Language corresponding to
102 slant FC_SLANT Int Italic, oblique or roman
103 weight FC_WEIGHT Int Light, medium, demibold,
105 size FC_SIZE Double Point size
106 width FC_WIDTH Int Condensed, normal or expanded
107 aspect FC_ASPECT Double Stretches glyphs horizontally
109 pixelsize FC_PIXEL_SIZE Double Pixel size
110 spacing FC_SPACING Int Proportional, dual-width,
111 monospace or charcell
112 foundry FC_FOUNDRY String Font foundry name
113 antialias FC_ANTIALIAS Bool Whether glyphs can be
115 hinting FC_HINTING Bool Whether the rasterizer should
117 hintstyle FC_HINT_STYLE Int Automatic hinting style
118 verticallayout FC_VERTICAL_LAYOUT Bool Use vertical layout
119 autohint FC_AUTOHINT Bool Use autohinter instead of
121 globaladvance FC_GLOBAL_ADVANCE Bool Use font global advance data (deprecated)
122 file FC_FILE String The filename holding the font
123 index FC_INDEX Int The index of the font within
125 ftface FC_FT_FACE FT_Face Use the specified FreeType
127 rasterizer FC_RASTERIZER String Which rasterizer is in use
128 outline FC_OUTLINE Bool Whether the glyphs are outlines
129 scalable FC_SCALABLE Bool Whether glyphs can be scaled
130 scale FC_SCALE Double Scale factor for point->pixel
132 dpi FC_DPI Double Target dots per inch
133 rgba FC_RGBA Int unknown, rgb, bgr, vrgb,
134 vbgr, none - subpixel geometry
135 lcdfilter FC_LCD_FILTER Int Type of LCD filter
136 minspace FC_MINSPACE Bool Eliminate leading from line
138 charset FC_CHARSET CharSet Unicode chars encoded by
140 lang FC_LANG LangSet Set of RFC-3066-style
141 languages this font supports
142 fontversion FC_FONTVERSION Int Version number of the font
143 capability FC_CAPABILITY String List of layout capabilities in
145 embolden FC_EMBOLDEN Bool Rasterizer should
146 synthetically embolden the font
147 namelang FC_NAMELANG String Language name to be used for the
148 default value of familylang,
149 stylelang and fullnamelang
152 --------------------------------------------------------------------------
156 Fontconfig uses abstract data types to hide internal implementation
157 details for most data structures. A few structures are exposed where
160 --------------------------------------------------------------------------
162 FcChar8, FcChar16, FcChar32, FcBool
164 These are primitive data types; the FcChar* types hold precisely the
165 number of bits stated (if supported by the C implementation). FcBool holds
166 one of two C preprocessor symbols: FcFalse or FcTrue.
168 --------------------------------------------------------------------------
172 An FcMatrix holds an affine transformation, usually used to reshape
173 glyphs. A small set of matrix operations are provided to manipulate these.
175 typedef struct _FcMatrix {
176 double xx, xy, yx, yy;
180 --------------------------------------------------------------------------
184 An FcCharSet is an abstract type that holds the set of encoded Unicode
185 chars in a font. Operations to build and compare these sets are provided.
187 --------------------------------------------------------------------------
191 An FcLangSet is an abstract type that holds the set of languages supported
192 by a font. Operations to build and compare these sets are provided. These
193 are computed for a font based on orthographic information built into the
194 fontconfig library. Fontconfig has orthographies for all of the ISO 639-1
195 languages except for MS, NA, PA, PS, QU, RN, RW, SD, SG, SN, SU and ZA. If
196 you have orthographic information for any of these languages, please
199 --------------------------------------------------------------------------
203 An FcLangResult is an enumeration used to return the results of comparing
204 two language strings or FcLangSet objects. FcLangEqual means the objects
205 match language and territory. FcLangDifferentTerritory means the objects
206 match in language but differ in territory. FcLangDifferentLang means the
207 objects differ in language.
209 --------------------------------------------------------------------------
213 Tags the kind of data stored in an FcValue.
215 --------------------------------------------------------------------------
219 An FcValue object holds a single value with one of a number of different
220 types. The 'type' tag indicates which member is valid.
222 typedef struct _FcValue {
239 Type Union member Datatype
240 --------------------------------
241 FcTypeVoid (none) (none)
243 FcTypeDouble d double
244 FcTypeString s FcChar8 *
246 FcTypeMatrix m FcMatrix *
247 FcTypeCharSet c FcCharSet *
248 FcTypeFTFace f void * (FT_Face)
249 FcTypeLangSet l FcLangSet *
252 --------------------------------------------------------------------------
256 holds a set of names with associated value lists; each name refers to a
257 property of a font. FcPatterns are used as inputs to the matching code as
258 well as holding information about specific fonts. Each property can hold
259 one or more values; conventionally all of the same type, although the
260 interface doesn't demand that.
262 --------------------------------------------------------------------------
266 typedef struct _FcFontSet {
273 An FcFontSet contains a list of FcPatterns. Internally fontconfig uses
274 this data structure to hold sets of fonts. Externally, fontconfig returns
275 the results of listing fonts in this format. 'nfont' holds the number of
276 patterns in the 'fonts' array; 'sfont' is used to indicate the size of
279 --------------------------------------------------------------------------
283 FcStrSet holds a list of strings that can be appended to and enumerated.
284 Its unique characteristic is that the enumeration works even while strings
285 are appended during enumeration. FcStrList is used during enumeration to
286 safely and correctly walk the list of strings even while that list is
287 edited in the middle of enumeration.
289 --------------------------------------------------------------------------
293 typedef struct _FcObjectSet {
296 const char **objects;
300 holds a set of names and is used to specify which fields from fonts are
301 placed in the the list of returned patterns when listing fonts.
303 --------------------------------------------------------------------------
307 typedef struct _FcObjectType {
313 marks the type of a pattern element generated when parsing font names.
314 Applications can add new object types so that font names may contain the
317 --------------------------------------------------------------------------
321 typedef struct _FcConstant {
328 Provides for symbolic constants for new pattern elements. When 'name' is
329 seen in a font name, an 'object' element is created with value 'value'.
331 --------------------------------------------------------------------------
335 holds a list of Unicode chars which are expected to be blank; unexpectedly
336 blank chars are assumed to be invalid and are elided from the charset
337 associated with the font.
339 --------------------------------------------------------------------------
343 holds the per-user cache information for use while loading the font
344 database. This is built automatically for the current configuration when
345 that is loaded. Applications must always pass '0' when one is requested.
347 --------------------------------------------------------------------------
351 holds a complete configuration of the library; there is one default
352 configuration, other can be constructed from XML data structures. All
353 public entry points that need global data can take an optional FcConfig*
354 argument; passing 0 uses the default configuration. FcConfig objects hold
355 two sets of fonts, the first contains those specified by the
356 configuration, the second set holds those added by the application at
357 run-time. Interfaces that need to reference a particular set use one of
358 the FcSetName enumerated values.
360 --------------------------------------------------------------------------
364 Specifies one of the two sets of fonts available in a configuration;
365 FcSetSystem for those fonts specified in the configuration and
366 FcSetApplication which holds fonts provided by the application.
368 --------------------------------------------------------------------------
372 Used as a return type for functions manipulating FcPattern objects.
376 -----------------------------------------------------------
377 FcResultMatch Object exists with the specified ID
378 FcResultNoMatch Object doesn't exist at all
379 FcResultTypeMismatch Object exists, but the type doesn't match
380 FcResultNoId Object exists, but has fewer values
382 FcResultOutOfMemory malloc failed
385 --------------------------------------------------------------------------
389 Used for locking access to configuration files. Provides a safe way to
390 update configuration files.
392 --------------------------------------------------------------------------
396 Holds information about the fonts contained in a single directory. Normal
397 applications need not worry about this as caches for font access are
398 automatically managed by the library. Applications dealing with cache
399 management may want to use some of these objects in their work, however
400 the included 'fc-cache' program generally suffices for all of that.
402 --------------------------------------------------------------------------
406 These are grouped by functionality, often using the main data type being
409 --------------------------------------------------------------------------
415 [5]FcInitLoadConfig -- load configuration
417 [6]FcInitLoadConfigAndFonts -- load configuration and font data
419 [7]FcInit -- initialize fontconfig library
421 [8]FcFini -- finalize fontconfig library
423 [9]FcGetVersion -- library version number
425 [10]FcInitReinitialize -- re-initialize library
427 [11]FcInitBringUptoDate -- reload configuration files if needed
429 These functions provide some control over how the library is initialized.
435 FcInitLoadConfig -- load configuration
439 #include <fontconfig/fontconfig.h>
442 FcConfig * FcInitLoadConfig(void);
446 Loads the default configuration file and returns the resulting
447 configuration. Does not load any font information.
451 Fontconfig version 2.10.91
453 FcInitLoadConfigAndFonts
457 FcInitLoadConfigAndFonts -- load configuration and font data
461 #include <fontconfig/fontconfig.h>
464 FcConfig * FcInitLoadConfigAndFonts(void);
468 Loads the default configuration file and builds information about the
469 available fonts. Returns the resulting configuration.
473 Fontconfig version 2.10.91
479 FcInit -- initialize fontconfig library
483 #include <fontconfig/fontconfig.h>
490 Loads the default configuration file and the fonts referenced therein and
491 sets the default configuration to that result. Returns whether this
492 process succeeded or not. If the default configuration has already been
493 loaded, this routine does nothing and returns FcTrue.
497 Fontconfig version 2.10.91
503 FcFini -- finalize fontconfig library
507 #include <fontconfig/fontconfig.h>
514 Frees all data structures allocated by previous calls to fontconfig
515 functions. Fontconfig returns to an uninitialized state, requiring a new
516 call to one of the FcInit functions before any other fontconfig function
521 Fontconfig version 2.10.91
527 FcGetVersion -- library version number
531 #include <fontconfig/fontconfig.h>
534 int FcGetVersion(void);
538 Returns the version number of the library.
542 Fontconfig version 2.10.91
548 FcInitReinitialize -- re-initialize library
552 #include <fontconfig/fontconfig.h>
555 FcBool FcInitReinitialize(void);
559 Forces the default configuration file to be reloaded and resets the
560 default configuration. Returns FcFalse if the configuration cannot be
561 reloaded (due to configuration file errors, allocation failures or other
562 issues) and leaves the existing configuration unchanged. Otherwise returns
567 Fontconfig version 2.10.91
573 FcInitBringUptoDate -- reload configuration files if needed
577 #include <fontconfig/fontconfig.h>
580 FcBool FcInitBringUptoDate(void);
584 Checks the rescan interval in the default configuration, checking the
585 configuration if the interval has passed and reloading the configuration
586 if when any changes are detected. Returns FcFalse if the configuration
587 cannot be reloaded (see FcInitReinitialize). Otherwise returns FcTrue.
591 Fontconfig version 2.10.91
593 --------------------------------------------------------------------------
599 [12]FcPatternCreate -- Create a pattern
601 [13]FcPatternDuplicate -- Copy a pattern
603 [14]FcPatternReference -- Increment pattern reference count
605 [15]FcPatternDestroy -- Destroy a pattern
607 [16]FcPatternEqual -- Compare patterns
609 [17]FcPatternEqualSubset -- Compare portions of patterns
611 [18]FcPatternFilter -- Filter the objects of pattern
613 [19]FcPatternHash -- Compute a pattern hash value
615 [20]FcPatternAdd -- Add a value to a pattern
617 [21]FcPatternAddWeak -- Add a value to a pattern with weak binding
619 [22]FcPatternAdd-Type -- Add a typed value to a pattern
621 [23]FcPatternGet -- Return a value from a pattern
623 [24]FcPatternGet-Type -- Return a typed value from a pattern
625 [25]FcPatternBuild -- Create patterns from arguments
627 [26]FcPatternDel -- Delete a property from a pattern
629 [27]FcPatternRemove -- Remove one object of the specified type from the
632 [28]FcPatternPrint -- Print a pattern for debugging
634 [29]FcDefaultSubstitute -- Perform default substitutions in a pattern
636 [30]FcNameParse -- Parse a pattern string
638 [31]FcNameUnparse -- Convert a pattern back into a string that can be
641 [32]FcPatternFormat -- Format a pattern into a string according to a
644 An FcPattern is an opaque type that holds both patterns to match against
645 the available fonts, as well as the information about each font.
651 FcPatternCreate -- Create a pattern
655 #include <fontconfig/fontconfig.h>
658 FcPattern * FcPatternCreate(void);
662 Creates a pattern with no properties; used to build patterns from scratch.
666 Fontconfig version 2.10.91
672 FcPatternDuplicate -- Copy a pattern
676 #include <fontconfig/fontconfig.h>
679 FcPattern * FcPatternDuplicate(const FcPattern *p);
683 Copy a pattern, returning a new pattern that matches p. Each pattern may
684 be modified without affecting the other.
688 Fontconfig version 2.10.91
694 FcPatternReference -- Increment pattern reference count
698 #include <fontconfig/fontconfig.h>
701 void FcPatternReference(FcPattern *p);
705 Add another reference to p. Patterns are freed only when the reference
710 Fontconfig version 2.10.91
716 FcPatternDestroy -- Destroy a pattern
720 #include <fontconfig/fontconfig.h>
723 void FcPatternDestroy(FcPattern *p);
727 Decrement the pattern reference count. If all references are gone,
728 destroys the pattern, in the process destroying all related values.
732 Fontconfig version 2.10.91
738 FcPatternEqual -- Compare patterns
742 #include <fontconfig/fontconfig.h>
745 FcBool FcPatternEqual(const FcPattern *pa, const FcPattern *pb);
749 Returns whether pa and pb are exactly alike.
753 Fontconfig version 2.10.91
759 FcPatternEqualSubset -- Compare portions of patterns
763 #include <fontconfig/fontconfig.h>
766 FcBool FcPatternEqualSubset(const FcPattern *pa, const FcPattern *pb,
767 const FcObjectSet *os);
771 Returns whether pa and pb have exactly the same values for all of the
776 Fontconfig version 2.10.91
782 FcPatternFilter -- Filter the objects of pattern
786 #include <fontconfig/fontconfig.h>
789 FcPattern * FcPatternFilter(FcPattern *p, const FcObjectSet *);
793 Returns a new pattern that only has those objects from p that are in os.
794 If os is NULL, a duplicate of p is returned.
798 Fontconfig version 2.10.91
804 FcPatternHash -- Compute a pattern hash value
808 #include <fontconfig/fontconfig.h>
811 FcChar32 FcPatternHash(const FcPattern *p);
815 Returns a 32-bit number which is the same for any two patterns which are
820 Fontconfig version 2.10.91
826 FcPatternAdd -- Add a value to a pattern
830 #include <fontconfig/fontconfig.h>
833 FcBool FcPatternAdd(FcPattern *p, const char *object, FcValue value,
838 Adds a single value to the list of values associated with the property
839 named `object. If `append is FcTrue, the value is added at the end of any
840 existing list, otherwise it is inserted at the beginning. `value' is saved
841 (with FcValueSave) when inserted into the pattern so that the library
842 retains no reference to any application-supplied data structure.
846 Fontconfig version 2.10.91
852 FcPatternAddWeak -- Add a value to a pattern with weak binding
856 #include <fontconfig/fontconfig.h>
859 FcBool FcPatternAddWeak(FcPattern *p, const char *object, FcValue value,
864 FcPatternAddWeak is essentially the same as FcPatternAdd except that any
865 values added to the list have binding weak instead of strong.
869 Fontconfig version 2.10.91
875 FcPatternAddInteger, FcPatternAddDouble, FcPatternAddString,
876 FcPatternAddMatrix, FcPatternAddCharSet, FcPatternAddBool,
877 FcPatternAddFTFace, FcPatternAddLangSet -- Add a typed value to a pattern
881 #include <fontconfig/fontconfig.h>
884 FcBool FcPatternAddInteger(FcPattern *p, const char *object, int i);
886 FcBool FcPatternAddDouble(FcPattern *p, const char *object, double d);
888 FcBool FcPatternAddString(FcPattern *p, const char *object, const FcChar8
891 FcBool FcPatternAddMatrix(FcPattern *p, const char *object, const FcMatrix
894 FcBool FcPatternAddCharSet(FcPattern *p, const char *object, const
897 FcBool FcPatternAddBool(FcPattern *p, const char *object, FcBool b);
899 FcBool FcPatternAddFTFace(FcPattern *p, const char *object, const
902 FcBool FcPatternAddLangSet(FcPattern *p, const char *object, const
907 These are all convenience functions that insert objects of the specified
908 type into the pattern. Use these in preference to FcPatternAdd as they
909 will provide compile-time typechecking. These all append values to any
910 existing list of values.
914 Fontconfig version 2.10.91
920 FcPatternGet -- Return a value from a pattern
924 #include <fontconfig/fontconfig.h>
927 FcResult FcPatternGet(FcPattern *p, const char *object, int id, FcValue
932 Returns in v the id'th value associated with the property object. The
933 value returned is not a copy, but rather refers to the data stored within
934 the pattern directly. Applications must not free this value.
938 Fontconfig version 2.10.91
944 FcPatternGetInteger, FcPatternGetDouble, FcPatternGetString,
945 FcPatternGetMatrix, FcPatternGetCharSet, FcPatternGetBool,
946 FcPatternGetFTFace, FcPatternGetLangSet -- Return a typed value from a
951 #include <fontconfig/fontconfig.h>
954 FcResult FcPatternGetInteger(FcPattern *p, const char *object, int n, int
957 FcResult FcPatternGetDouble(FcPattern *p, const char *object, int n,
960 FcResult FcPatternGetString(FcPattern *p, const char *object, int n,
963 FcResult FcPatternGetMatrix(FcPattern *p, const char *object, int n,
966 FcResult FcPatternGetCharSet(FcPattern *p, const char *object, int n,
969 FcResult FcPatternGetBool(FcPattern *p, const char *object, int n, FcBool
972 FcResult FcPatternGetFTFace(FcPattern *p, const char *object, int n);
974 FcResult FcPatternGetLangSet(FcPattern *p, const char *object, FT_Face
979 These are convenience functions that call FcPatternGet and verify that the
980 returned data is of the expected type. They return FcResultTypeMismatch if
981 this is not the case. Note that these (like FcPatternGet) do not make a
982 copy of any data structure referenced by the return value. Use these in
983 preference to FcPatternGet to provide compile-time typechecking.
987 Fontconfig version 2.10.91
993 FcPatternBuild, FcPatternVaBuild, FcPatternVapBuild -- Create patterns
998 #include <fontconfig/fontconfig.h>
1001 FcPattern * FcPatternBuild(FcPattern *pattern, ...);
1003 FcPattern * FcPatternVaBuild(FcPattern *pattern, va_list va);
1005 void FcPatternVapBuild(FcPattern *result, FcPattern *pattern, va_list va);
1009 Builds a pattern using a list of objects, types and values. Each value to
1010 be entered in the pattern is specified with three arguments:
1012 1. Object name, a string describing the property to be added.
1014 2. Object type, one of the FcType enumerated values
1016 3. Value, not an FcValue, but the raw type as passed to any of the
1017 FcPatternAdd<type> functions. Must match the type of the second
1020 The argument list is terminated by a null object name, no object type nor
1021 value need be passed for this. The values are added to `pattern', if
1022 `pattern' is null, a new pattern is created. In either case, the pattern
1023 is returned. Example
1025 pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Times", (char *) 0);
1027 FcPatternVaBuild is used when the arguments are already in the form of a
1028 varargs value. FcPatternVapBuild is a macro version of FcPatternVaBuild
1029 which returns its result directly in the result variable.
1033 Fontconfig version 2.10.91
1039 FcPatternDel -- Delete a property from a pattern
1043 #include <fontconfig/fontconfig.h>
1046 FcBool FcPatternDel(FcPattern *p, const char *object);
1050 Deletes all values associated with the property `object', returning
1051 whether the property existed or not.
1055 Fontconfig version 2.10.91
1061 FcPatternRemove -- Remove one object of the specified type from the
1066 #include <fontconfig/fontconfig.h>
1069 FcBool FcPatternRemove(FcPattern *p, const char *object, int id);
1073 Removes the value associated with the property `object' at position `id',
1074 returning whether the property existed and had a value at that position or
1079 Fontconfig version 2.10.91
1085 FcPatternPrint -- Print a pattern for debugging
1089 #include <fontconfig/fontconfig.h>
1092 void FcPatternPrint(const FcPattern *p);
1096 Prints an easily readable version of the pattern to stdout. There is no
1097 provision for reparsing data in this format, it's just for diagnostics and
1102 Fontconfig version 2.10.91
1108 FcDefaultSubstitute -- Perform default substitutions in a pattern
1112 #include <fontconfig/fontconfig.h>
1115 void FcDefaultSubstitute(FcPattern *pattern);
1119 Supplies default values for underspecified font patterns:
1121 * Patterns without a specified style or weight are set to Medium
1123 * Patterns without a specified style or slant are set to Roman
1125 * Patterns without a specified pixel size are given one computed from
1126 any specified point size (default 12), dpi (default 75) and scale
1131 Fontconfig version 2.10.91
1137 FcNameParse -- Parse a pattern string
1141 #include <fontconfig/fontconfig.h>
1144 FcPattern * FcNameParse(const FcChar8 *name);
1148 Converts name from the standard text format described above into a
1153 Fontconfig version 2.10.91
1159 FcNameUnparse -- Convert a pattern back into a string that can be parsed
1163 #include <fontconfig/fontconfig.h>
1166 FcChar8 * FcNameUnparse(FcPattern *pat);
1170 Converts the given pattern into the standard text format described above.
1171 The return value is not static, but instead refers to newly allocated
1172 memory which should be freed by the caller using free().
1176 Fontconfig version 2.10.91
1182 FcPatternFormat -- Format a pattern into a string according to a format
1187 #include <fontconfig/fontconfig.h>
1190 FcChar8 * FcPatternFormat(FcPattern *pat, const FcChar8 *format);
1194 Converts given pattern pat into text described by the format specifier
1195 format. The return value refers to newly allocated memory which should be
1196 freed by the caller using free(), or NULL if format is invalid.
1198 The format is loosely modeled after printf-style format string. The
1199 format string is composed of zero or more directives: ordinary characters
1200 (not "%"), which are copied unchanged to the output stream; and tags which
1201 are interpreted to construct text from the pattern in a variety of ways
1202 (explained below). Special characters can be escaped using backslash.
1203 C-string style special characters like \n and \r are also supported (this
1204 is useful when the format string is not a C string literal). It is
1205 advisable to always escape curly braces that are meant to be copied to the
1206 output as ordinary characters.
1208 Each tag is introduced by the character "%", followed by an optional
1209 minimum field width, followed by tag contents in curly braces ({}). If the
1210 minimum field width value is provided the tag will be expanded and the
1211 result padded to achieve the minimum width. If the minimum field width is
1212 positive, the padding will right-align the text. Negative field width will
1213 left-align. The rest of this section describes various supported tag
1214 contents and their expansion.
1216 A simple tag is one where the content is an identifier. When simple tags
1217 are expanded, the named identifier will be looked up in pattern and the
1218 resulting list of values returned, joined together using comma. For
1219 example, to print the family name and style of the pattern, use the format
1220 "%{family} %{style}\n". To extend the family column to forty characters
1221 use "%-40{family}%{style}\n".
1223 Simple tags expand to list of all values for an element. To only choose
1224 one of the values, one can index using the syntax "%{elt[idx]}". For
1225 example, to get the first family name only, use "%{family[0]}".
1227 If a simple tag ends with "=" and the element is found in the pattern,
1228 the name of the element followed by "=" will be output before the list of
1229 values. For example, "%{weight=}" may expand to the string "weight=80". Or
1230 to the empty string if pattern does not have weight set.
1232 If a simple tag starts with ":" and the element is found in the pattern,
1233 ":" will be printed first. For example, combining this with the =, the
1234 format "%{:weight=}" may expand to ":weight=80" or to the empty string if
1235 pattern does not have weight set.
1237 If a simple tag contains the string ":-", the rest of the the tag
1238 contents will be used as a default string. The default string is output if
1239 the element is not found in the pattern. For example, the format
1240 "%{:weight=:-123}" may expand to ":weight=80" or to the string
1241 ":weight=123" if pattern does not have weight set.
1243 A count tag is one that starts with the character "#" followed by an
1244 element name, and expands to the number of values for the element in the
1245 pattern. For example, "%{#family}" expands to the number of family names
1246 pattern has set, which may be zero.
1248 A sub-expression tag is one that expands a sub-expression. The tag
1249 contents are the sub-expression to expand placed inside another set of
1250 curly braces. Sub-expression tags are useful for aligning an entire
1251 sub-expression, or to apply converters (explained later) to the entire
1252 sub-expression output. For example, the format "%40{{%{family} %{style}}}"
1253 expands the sub-expression to construct the family name followed by the
1254 style, then takes the entire string and pads it on the left to be at least
1257 A filter-out tag is one starting with the character "-" followed by a
1258 comma-separated list of element names, followed by a sub-expression
1259 enclosed in curly braces. The sub-expression will be expanded but with a
1260 pattern that has the listed elements removed from it. For example, the
1261 format "%{-size,pixelsize{sub-expr}}" will expand "sub-expr" with pattern
1262 sans the size and pixelsize elements.
1264 A filter-in tag is one starting with the character "+" followed by a
1265 comma-separated list of element names, followed by a sub-expression
1266 enclosed in curly braces. The sub-expression will be expanded but with a
1267 pattern that only has the listed elements from the surrounding pattern.
1268 For example, the format "%{+family,familylang{sub-expr}}" will expand
1269 "sub-expr" with a sub-pattern consisting only the family and family lang
1270 elements of pattern.
1272 A conditional tag is one starting with the character "?" followed by a
1273 comma-separated list of element conditions, followed by two sub-expression
1274 enclosed in curly braces. An element condition can be an element name, in
1275 which case it tests whether the element is defined in pattern, or the
1276 character "!" followed by an element name, in which case the test is
1277 negated. The conditional passes if all the element conditions pass. The
1278 tag expands the first sub-expression if the conditional passes, and
1279 expands the second sub-expression otherwise. For example, the format
1280 "%{?size,dpi,!pixelsize{pass}{fail}}" will expand to "pass" if pattern has
1281 size and dpi elements but no pixelsize element, and to "fail" otherwise.
1283 An enumerate tag is one starting with the string "[]" followed by a
1284 comma-separated list of element names, followed by a sub-expression
1285 enclosed in curly braces. The list of values for the named elements are
1286 walked in parallel and the sub-expression expanded each time with a
1287 pattern just having a single value for those elements, starting from the
1288 first value and continuing as long as any of those elements has a value.
1289 For example, the format "%{[]family,familylang{%{family}
1290 (%{familylang})\n}}" will expand the pattern "%{family} (%{familylang})\n"
1291 with a pattern having only the first value of the family and familylang
1292 elements, then expands it with the second values, then the third, etc.
1294 As a special case, if an enumerate tag has only one element, and that
1295 element has only one value in the pattern, and that value is of type
1296 FcLangSet, the individual languages in the language set are enumerated.
1298 A builtin tag is one starting with the character "=" followed by a
1299 builtin name. The following builtins are defined:
1303 Expands to the result of calling FcNameUnparse() on the pattern.
1307 Expands to the output of the default output format of the fc-match
1308 command on the pattern, without the final newline.
1312 Expands to the output of the default output format of the fc-list
1313 command on the pattern, without the final newline.
1317 Expands to the output of the default output format of the fc-cat
1318 command on the pattern, without the final newline.
1322 Expands to the list of PackageKit font() tags for the pattern.
1323 Currently this includes tags for each family name, and each
1324 language from the pattern, enumerated and sanitized into a set of
1325 tags terminated by newline. Package management systems can use
1326 these tags to tag their packages accordingly.
1328 For example, the format "%{+family,style{%{=unparse}}}\n" will expand to
1329 an unparsed name containing only the family and style element values from
1332 The contents of any tag can be followed by a set of zero or more
1333 converters. A converter is specified by the character "|" followed by the
1334 converter name and arguments. The following converters are defined:
1338 Replaces text with the results of calling FcStrBasename() on it.
1342 Replaces text with the results of calling FcStrDirname() on it.
1346 Replaces text with the results of calling FcStrDowncase() on it.
1350 Escapes text for one level of shell expansion. (Escapes
1351 single-quotes, also encloses text in single-quotes.)
1355 Escapes text such that it can be used as part of a C string
1356 literal. (Escapes backslash and double-quotes.)
1360 Escapes text such that it can be used in XML and HTML. (Escapes
1361 less-than, greater-than, and ampersand.)
1365 Deletes all occurrences of each of the characters in chars from
1366 the text. FIXME: This converter is not UTF-8 aware yet.
1370 Escapes all occurrences of each of the characters in chars by
1371 prepending it by the first character in chars. FIXME: This
1372 converter is not UTF-8 aware yet.
1376 Translates all occurrences of each of the characters in from by
1377 replacing them with their corresponding character in to. If to has
1378 fewer characters than from, it will be extended by repeating its
1379 last character. FIXME: This converter is not UTF-8 aware yet.
1381 For example, the format "%{family|downcase|delete( )}\n" will expand to
1382 the values of the family element in pattern, lower-cased and with spaces
1387 Fontconfig version 2.10.91
1389 --------------------------------------------------------------------------
1395 [33]FcFontSetCreate -- Create a font set
1397 [34]FcFontSetDestroy -- Destroy a font set
1399 [35]FcFontSetAdd -- Add to a font set
1401 [36]FcFontSetList -- List fonts from a set of font sets
1403 [37]FcFontSetMatch -- Return the best font from a set of font sets
1405 [38]FcFontSetPrint -- Print a set of patterns to stdout
1407 [39]FcFontSetSort -- Add to a font set
1409 [40]FcFontSetSortDestroy -- DEPRECATED destroy a font set
1411 An FcFontSet simply holds a list of patterns; these are used to return the
1412 results of listing available fonts.
1418 FcFontSetCreate -- Create a font set
1422 #include <fontconfig/fontconfig.h>
1425 FcFontSet * FcFontSetCreate(void);
1429 Creates an empty font set.
1433 Fontconfig version 2.10.91
1439 FcFontSetDestroy -- Destroy a font set
1443 #include <fontconfig/fontconfig.h>
1446 void FcFontSetDestroy(FcFontSet *s);
1450 Destroys a font set. Note that this destroys any referenced patterns as
1455 Fontconfig version 2.10.91
1461 FcFontSetAdd -- Add to a font set
1465 #include <fontconfig/fontconfig.h>
1468 FcBool FcFontSetAdd(FcFontSet *s, FcPattern *font);
1472 Adds a pattern to a font set. Note that the pattern is not copied before
1473 being inserted into the set. Returns FcFalse if the pattern cannot be
1474 inserted into the set (due to allocation failure). Otherwise returns
1479 Fontconfig version 2.10.91
1485 FcFontSetList -- List fonts from a set of font sets
1489 #include <fontconfig/fontconfig.h>
1492 FcFontSet * FcFontSetList(FcConfig *config, FcFontSet **sets, intnsets,
1493 FcPattern *pattern, FcObjectSet *object_set);
1497 Selects fonts matching pattern from sets, creates patterns from those
1498 fonts containing only the objects in object_set and returns the set of
1499 unique such patterns. If config is NULL, the default configuration is
1500 checked to be up to date, and used.
1504 Fontconfig version 2.10.91
1510 FcFontSetMatch -- Return the best font from a set of font sets
1514 #include <fontconfig/fontconfig.h>
1517 FcPattern * FcFontSetMatch(FcConfig *config, FcFontSet **sets, intnsets,
1518 FcPattern *pattern, FcResult *result);
1522 Finds the font in sets most closely matching pattern and returns the
1523 result of FcFontRenderPrepare for that font and the provided pattern. This
1524 function should be called only after FcConfigSubstitute and
1525 FcDefaultSubstitute have been called for pattern; otherwise the results
1526 will not be correct. If config is NULL, the current configuration is used.
1527 Returns NULL if an error occurs during this process.
1531 Fontconfig version 2.10.91
1537 FcFontSetPrint -- Print a set of patterns to stdout
1541 #include <fontconfig/fontconfig.h>
1544 void FcFontSetPrint(FcFontSet *set);
1548 This function is useful for diagnosing font related issues, printing the
1549 complete contents of every pattern in set. The format of the output is
1550 designed to be of help to users and developers, and may change at any
1555 Fontconfig version 2.10.91
1561 FcFontSetSort -- Add to a font set
1565 #include <fontconfig/fontconfig.h>
1568 FcFontSetSort(FcConfig *config, FcFontSet **sets, intnsets, FcPattern
1569 *pattern, FcBool trim, FcCharSet **csp, FcResult *result);
1573 Returns the list of fonts from sets sorted by closeness to pattern. If
1574 trim is FcTrue, elements in the list which don't include Unicode coverage
1575 not provided by earlier elements in the list are elided. The union of
1576 Unicode coverage of all of the fonts is returned in csp, if csp is not
1577 NULL. This function should be called only after FcConfigSubstitute and
1578 FcDefaultSubstitute have been called for p; otherwise the results will not
1581 The returned FcFontSet references FcPattern structures which may be shared
1582 by the return value from multiple FcFontSort calls, applications cannot
1583 modify these patterns. Instead, they should be passed, along with pattern
1584 to FcFontRenderPrepare which combines them into a complete pattern.
1586 The FcFontSet returned by FcFontSetSort is destroyed by calling
1591 Fontconfig version 2.10.91
1593 FcFontSetSortDestroy
1597 FcFontSetSortDestroy -- DEPRECATED destroy a font set
1601 #include <fontconfig/fontconfig.h>
1604 FcFontSetSortDestroy(FcFontSet *set);
1608 This function is DEPRECATED. FcFontSetSortDestroy destroys set by calling
1609 FcFontSetDestroy. Applications should use FcFontSetDestroy directly
1614 Fontconfig version 2.10.91
1616 --------------------------------------------------------------------------
1622 [41]FcObjectSetCreate -- Create an object set
1624 [42]FcObjectSetAdd -- Add to an object set
1626 [43]FcObjectSetDestroy -- Destroy an object set
1628 [44]FcObjectSetBuild -- Build object set from args
1630 An FcObjectSet holds a list of pattern property names; it is used to
1631 indicate which properties are to be returned in the patterns from
1638 FcObjectSetCreate -- Create an object set
1642 #include <fontconfig/fontconfig.h>
1645 FcObjectSet * FcObjectSetCreate(void);
1649 Creates an empty set.
1653 Fontconfig version 2.10.91
1659 FcObjectSetAdd -- Add to an object set
1663 #include <fontconfig/fontconfig.h>
1666 FcBool FcObjectSetAdd(FcObjectSet *os, const char *object);
1670 Adds a property name to the set. Returns FcFalse if the property name
1671 cannot be inserted into the set (due to allocation failure). Otherwise
1676 Fontconfig version 2.10.91
1682 FcObjectSetDestroy -- Destroy an object set
1686 #include <fontconfig/fontconfig.h>
1689 void FcObjectSetDestroy(FcObjectSet *os);
1693 Destroys an object set.
1697 Fontconfig version 2.10.91
1703 FcObjectSetBuild, FcObjectSetVaBuild, FcObjectSetVapBuild -- Build object
1708 #include <fontconfig/fontconfig.h>
1711 FcObjectSet * FcObjectSetBuild(const char *first, ...);
1713 FcObjectSet * FcObjectSetVaBuild(const char *first, va_list va);
1715 void FcObjectSetVapBuild(FcObjectSet *result, const char *first, va_list
1720 These build an object set from a null-terminated list of property names.
1721 FcObjectSetVapBuild is a macro version of FcObjectSetVaBuild which returns
1722 the result in the result variable directly.
1726 Fontconfig version 2.10.91
1728 --------------------------------------------------------------------------
1730 FreeType specific functions
1734 [45]FcFreeTypeCharIndex -- map Unicode to glyph id
1736 [46]FcFreeTypeCharSet -- compute Unicode coverage
1738 [47]FcFreeTypeCharSetAndSpacing -- compute Unicode coverage and spacing
1741 [48]FcFreeTypeQuery -- compute pattern from font file (and index)
1743 [49]FcFreeTypeQueryFace -- compute pattern from FT_Face
1745 While the fontconfig library doesn't insist that FreeType be used as the
1746 rasterization mechanism for fonts, it does provide some convenience
1753 FcFreeTypeCharIndex -- map Unicode to glyph id
1757 #include <fontconfig.h>
1758 #include <fcfreetype.h>
1761 FT_UInt FcFreeTypeCharIndex(FT_Face face, FcChar32 ucs4);
1765 Maps a Unicode char to a glyph index. This function uses information from
1766 several possible underlying encoding tables to work around broken fonts.
1767 As a result, this function isn't designed to be used in performance
1768 sensitive areas; results from this function are intended to be cached by
1769 higher level functions.
1773 Fontconfig version 2.10.91
1779 FcFreeTypeCharSet -- compute Unicode coverage
1783 #include <fontconfig.h>
1784 #include <fcfreetype.h>
1787 FcCharSet * FcFreeTypeCharSet(FT_Face face, FcBlanks *blanks);
1791 Scans a FreeType face and returns the set of encoded Unicode chars. This
1792 scans several encoding tables to build as complete a list as possible. If
1793 'blanks' is not 0, the glyphs in the font are examined and any blank
1794 glyphs not in 'blanks' are not placed in the returned FcCharSet.
1798 Fontconfig version 2.10.91
1800 FcFreeTypeCharSetAndSpacing
1804 FcFreeTypeCharSetAndSpacing -- compute Unicode coverage and spacing type
1808 #include <fontconfig.h>
1809 #include <fcfreetype.h>
1812 FcCharSet * FcFreeTypeCharSetAndSpacing(FT_Face face, FcBlanks *blanks,
1817 Scans a FreeType face and returns the set of encoded Unicode chars. This
1818 scans several encoding tables to build as complete a list as possible. If
1819 'blanks' is not 0, the glyphs in the font are examined and any blank
1820 glyphs not in 'blanks' are not placed in the returned FcCharSet. spacing
1821 receives the computed spacing type of the font, one of FC_MONO for a font
1822 where all glyphs have the same width, FC_DUAL, where the font has glyphs
1823 in precisely two widths, one twice as wide as the other, or
1824 FC_PROPORTIONAL where the font has glyphs of many widths.
1828 Fontconfig version 2.10.91
1834 FcFreeTypeQuery -- compute pattern from font file (and index)
1838 #include <fontconfig.h>
1839 #include <fcfreetype.h>
1842 FcPattern * FcFreeTypeQuery(const FcChar8 *file, int id, FcBlanks *blanks,
1847 Constructs a pattern representing the 'id'th font in 'file'. The number of
1848 fonts in 'file' is returned in 'count'.
1852 Fontconfig version 2.10.91
1858 FcFreeTypeQueryFace -- compute pattern from FT_Face
1862 #include <fontconfig.h>
1863 #include <fcfreetype.h>
1866 FcPattern * FcFreeTypeQueryFace(const FT_Face face, const FcChar8 *file,
1867 int id, FcBlanks *blanks);
1871 Constructs a pattern representing 'face'. 'file' and 'id' are used solely
1872 as data for pattern elements (FC_FILE, FC_INDEX and sometimes FC_FAMILY).
1876 Fontconfig version 2.10.91
1878 --------------------------------------------------------------------------
1884 [50]FcValueDestroy -- Free a value
1886 [51]FcValueSave -- Copy a value
1888 [52]FcValuePrint -- Print a value to stdout
1890 [53]FcValueEqual -- Test two values for equality
1892 FcValue is a structure containing a type tag and a union of all possible
1893 datatypes. The tag is an enum of type FcType and is intended to provide a
1894 measure of run-time typechecking, although that depends on careful
1901 FcValueDestroy -- Free a value
1905 #include <fontconfig/fontconfig.h>
1908 void FcValueDestroy(FcValue v);
1912 Frees any memory referenced by v. Values of type FcTypeString,
1913 FcTypeMatrix and FcTypeCharSet reference memory, the other types do not.
1917 Fontconfig version 2.10.91
1923 FcValueSave -- Copy a value
1927 #include <fontconfig/fontconfig.h>
1930 FcValue FcValueSave(FcValue v);
1934 Returns a copy of v duplicating any object referenced by it so that v may
1935 be safely destroyed without harming the new value.
1939 Fontconfig version 2.10.91
1945 FcValuePrint -- Print a value to stdout
1949 #include <fontconfig/fontconfig.h>
1952 void FcValuePrint(FcValue v);
1956 Prints a human-readable representation of v to stdout. The format should
1957 not be considered part of the library specification as it may change in
1962 Fontconfig version 2.10.91
1968 FcValueEqual -- Test two values for equality
1972 #include <fontconfig/fontconfig.h>
1975 FcBool FcValueEqual(FcValue v_a, FcValue v_b);
1979 Compares two values. Integers and Doubles are compared as numbers;
1980 otherwise the two values have to be the same type to be considered equal.
1981 Strings are compared ignoring case.
1985 Fontconfig version 2.10.91
1987 --------------------------------------------------------------------------
1993 [54]FcCharSetCreate -- Create an empty character set
1995 [55]FcCharSetDestroy -- Destroy a character set
1997 [56]FcCharSetAddChar -- Add a character to a charset
1999 [57]FcCharSetDelChar -- Add a character to a charset
2001 [58]FcCharSetCopy -- Copy a charset
2003 [59]FcCharSetEqual -- Compare two charsets
2005 [60]FcCharSetIntersect -- Intersect charsets
2007 [61]FcCharSetUnion -- Add charsets
2009 [62]FcCharSetSubtract -- Subtract charsets
2011 [63]FcCharSetMerge -- Merge charsets
2013 [64]FcCharSetHasChar -- Check a charset for a char
2015 [65]FcCharSetCount -- Count entries in a charset
2017 [66]FcCharSetIntersectCount -- Intersect and count charsets
2019 [67]FcCharSetSubtractCount -- Subtract and count charsets
2021 [68]FcCharSetIsSubset -- Test for charset inclusion
2023 [69]FcCharSetFirstPage -- Start enumerating charset contents
2025 [70]FcCharSetNextPage -- Continue enumerating charset contents
2027 [71]FcCharSetCoverage -- DEPRECATED return coverage for a Unicode page
2029 [72]FcCharSetNew -- DEPRECATED alias for FcCharSetCreate
2031 An FcCharSet is a boolean array indicating a set of Unicode chars. Those
2032 associated with a font are marked constant and cannot be edited.
2033 FcCharSets may be reference counted internally to reduce memory
2034 consumption; this may be visible to applications as the result of
2035 FcCharSetCopy may return it's argument, and that CharSet may remain
2042 FcCharSetCreate -- Create an empty character set
2046 #include <fontconfig/fontconfig.h>
2049 FcCharSet * FcCharSetCreate(void);
2053 FcCharSetCreate allocates and initializes a new empty character set
2058 Fontconfig version 2.10.91
2064 FcCharSetDestroy -- Destroy a character set
2068 #include <fontconfig/fontconfig.h>
2071 void FcCharSetDestroy(FcCharSet *fcs);
2075 FcCharSetDestroy decrements the reference count fcs. If the reference
2076 count becomes zero, all memory referenced is freed.
2080 Fontconfig version 2.10.91
2086 FcCharSetAddChar -- Add a character to a charset
2090 #include <fontconfig/fontconfig.h>
2093 FcBool FcCharSetAddChar(FcCharSet *fcs, FcChar32 ucs4);
2097 FcCharSetAddChar adds a single Unicode char to the set, returning FcFalse
2098 on failure, either as a result of a constant set or from running out of
2103 Fontconfig version 2.10.91
2109 FcCharSetDelChar -- Add a character to a charset
2113 #include <fontconfig/fontconfig.h>
2116 FcBool FcCharSetDelChar(FcCharSet *fcs, FcChar32 ucs4);
2120 FcCharSetDelChar deletes a single Unicode char from the set, returning
2121 FcFalse on failure, either as a result of a constant set or from running
2126 Fontconfig version 2.10.91
2132 FcCharSetCopy -- Copy a charset
2136 #include <fontconfig/fontconfig.h>
2139 FcCharSet * FcCharSetCopy(FcCharSet *src);
2143 Makes a copy of src; note that this may not actually do anything more than
2144 increment the reference count on src.
2148 Fontconfig version 2.10.91
2154 FcCharSetEqual -- Compare two charsets
2158 #include <fontconfig/fontconfig.h>
2161 FcBool FcCharSetEqual(const FcCharSet *a, const FcCharSet *b);
2165 Returns whether a and b contain the same set of Unicode chars.
2169 Fontconfig version 2.10.91
2175 FcCharSetIntersect -- Intersect charsets
2179 #include <fontconfig/fontconfig.h>
2182 FcCharSet * FcCharSetIntersect(const FcCharSet *a, const FcCharSet *b);
2186 Returns a set including only those chars found in both a and b.
2190 Fontconfig version 2.10.91
2196 FcCharSetUnion -- Add charsets
2200 #include <fontconfig/fontconfig.h>
2203 FcCharSet * FcCharSetUnion(const FcCharSet *a, const FcCharSet *b);
2207 Returns a set including only those chars found in either a or b.
2211 Fontconfig version 2.10.91
2217 FcCharSetSubtract -- Subtract charsets
2221 #include <fontconfig/fontconfig.h>
2224 FcCharSet * FcCharSetSubtract(const FcCharSet *a, const FcCharSet *b);
2228 Returns a set including only those chars found in a but not b.
2232 Fontconfig version 2.10.91
2238 FcCharSetMerge -- Merge charsets
2242 #include <fontconfig/fontconfig.h>
2245 FcBool FcCharSetMerge(FcCharSet *a, const FcCharSet *b, FcBool *changed);
2249 Adds all chars in b to a. In other words, this is an in-place version of
2250 FcCharSetUnion. If changed is not NULL, then it returns whether any new
2251 chars from b were added to a. Returns FcFalse on failure, either when a is
2252 a constant set or from running out of memory.
2256 Fontconfig version 2.10.91
2262 FcCharSetHasChar -- Check a charset for a char
2266 #include <fontconfig/fontconfig.h>
2269 FcBool FcCharSetHasChar(const FcCharSet *fcs, FcChar32 ucs4);
2273 Returns whether fcs contains the char ucs4.
2277 Fontconfig version 2.10.91
2283 FcCharSetCount -- Count entries in a charset
2287 #include <fontconfig/fontconfig.h>
2290 FcChar32 FcCharSetCount(const FcCharSet *a);
2294 Returns the total number of Unicode chars in a.
2298 Fontconfig version 2.10.91
2300 FcCharSetIntersectCount
2304 FcCharSetIntersectCount -- Intersect and count charsets
2308 #include <fontconfig/fontconfig.h>
2311 FcChar32 FcCharSetIntersectCount(const FcCharSet *a, const FcCharSet *b);
2315 Returns the number of chars that are in both a and b.
2319 Fontconfig version 2.10.91
2321 FcCharSetSubtractCount
2325 FcCharSetSubtractCount -- Subtract and count charsets
2329 #include <fontconfig/fontconfig.h>
2332 FcChar32 FcCharSetSubtractCount(const FcCharSet *a, const FcCharSet *b);
2336 Returns the number of chars that are in a but not in b.
2340 Fontconfig version 2.10.91
2346 FcCharSetIsSubset -- Test for charset inclusion
2350 #include <fontconfig/fontconfig.h>
2353 FcBool FcCharSetIsSubset(const FcCharSet *a, const FcCharSet *b);
2357 Returns whether a is a subset of b.
2361 Fontconfig version 2.10.91
2367 FcCharSetFirstPage -- Start enumerating charset contents
2371 #include <fontconfig/fontconfig.h>
2374 FcChar32 FcCharSetFirstPage(const FcCharSet *a,
2375 FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next);
2379 Builds an array of bits marking the first page of Unicode coverage of a.
2380 Returns the base of the array. next contains the next page in the font.
2384 Fontconfig version 2.10.91
2390 FcCharSetNextPage -- Continue enumerating charset contents
2394 #include <fontconfig/fontconfig.h>
2397 FcChar32 FcCharSetNextPage(const FcCharSet *a,
2398 FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next);
2402 Builds an array of bits marking the Unicode coverage of a for page *next.
2403 Returns the base of the array. next contains the next page in the font.
2407 Fontconfig version 2.10.91
2413 FcCharSetCoverage -- DEPRECATED return coverage for a Unicode page
2417 #include <fontconfig/fontconfig.h>
2420 FcChar32 FcCharSetCoverage(const FcCharSet *a, FcChar32page,
2425 DEPRECATED This function returns a bitmask in result which indicates which
2426 code points in page are included in a. FcCharSetCoverage returns the next
2427 page in the charset which has any coverage.
2431 Fontconfig version 2.10.91
2437 FcCharSetNew -- DEPRECATED alias for FcCharSetCreate
2441 #include <fontconfig/fontconfig.h>
2444 FcCharSet * FcCharSetNew(void);
2448 FcCharSetNew is a DEPRECATED alias for FcCharSetCreate.
2452 Fontconfig version 2.10.91
2454 --------------------------------------------------------------------------
2460 [73]FcLangSetCreate -- create a langset object
2462 [74]FcLangSetDestroy -- destroy a langset object
2464 [75]FcLangSetCopy -- copy a langset object
2466 [76]FcLangSetAdd -- add a language to a langset
2468 [77]FcLangSetDel -- delete a language from a langset
2470 [78]FcLangSetUnion -- Add langsets
2472 [79]FcLangSetSubtract -- Subtract langsets
2474 [80]FcLangSetCompare -- compare language sets
2476 [81]FcLangSetContains -- check langset subset relation
2478 [82]FcLangSetEqual -- test for matching langsets
2480 [83]FcLangSetHash -- return a hash value for a langset
2482 [84]FcLangSetHasLang -- test langset for language support
2484 [85]FcGetDefaultLangs -- Get the default languages list
2486 [86]FcGetLangs -- Get list of languages
2488 [87]FcLangNormalize -- Normalize the language string
2490 [88]FcLangGetCharSet -- Get character map for a language
2492 An FcLangSet is a set of language names (each of which include language
2493 and an optional territory). They are used when selecting fonts to indicate
2494 which languages the fonts need to support. Each font is marked, using
2495 language orthography information built into fontconfig, with the set of
2496 supported languages.
2502 FcLangSetCreate -- create a langset object
2506 #include <fontconfig/fontconfig.h>
2509 FcLangSet * FcLangSetCreate(void);
2513 FcLangSetCreate creates a new FcLangSet object.
2517 Fontconfig version 2.10.91
2523 FcLangSetDestroy -- destroy a langset object
2527 #include <fontconfig/fontconfig.h>
2530 void FcLangSetDestroy(FcLangSet *ls);
2534 FcLangSetDestroy destroys a FcLangSet object, freeing all memory
2539 Fontconfig version 2.10.91
2545 FcLangSetCopy -- copy a langset object
2549 #include <fontconfig/fontconfig.h>
2552 FcLangSet * FcLangSetCopy(const FcLangSet *ls);
2556 FcLangSetCopy creates a new FcLangSet object and populates it with the
2561 Fontconfig version 2.10.91
2567 FcLangSetAdd -- add a language to a langset
2571 #include <fontconfig/fontconfig.h>
2574 FcBool FcLangSetAdd(FcLangSet *ls, const FcChar8 *lang);
2578 lang is added to ls. lang should be of the form Ll-Tt where Ll is a two or
2579 three letter language from ISO 639 and Tt is a territory from ISO 3166.
2583 Fontconfig version 2.10.91
2589 FcLangSetDel -- delete a language from a langset
2593 #include <fontconfig/fontconfig.h>
2596 FcBool FcLangSetDel(FcLangSet *ls, const FcChar8 *lang);
2600 lang is removed from ls. lang should be of the form Ll-Tt where Ll is a
2601 two or three letter language from ISO 639 and Tt is a territory from ISO
2606 Fontconfig version 2.10.91
2612 FcLangSetUnion -- Add langsets
2616 #include <fontconfig/fontconfig.h>
2619 FcLangSet * FcLangSetUnion(const FcLangSet *ls_a, const FcLangSet *ls_b);
2623 Returns a set including only those languages found in either ls_a or ls_b.
2627 Fontconfig version 2.10.91
2633 FcLangSetSubtract -- Subtract langsets
2637 #include <fontconfig/fontconfig.h>
2640 FcLangSet * FcLangSetSubtract(const FcLangSet *ls_a, const FcLangSet
2645 Returns a set including only those languages found in ls_a but not in
2650 Fontconfig version 2.10.91
2656 FcLangSetCompare -- compare language sets
2660 #include <fontconfig/fontconfig.h>
2663 FcLangResult FcLangSetCompare(const FcLangSet *ls_a, const FcLangSet
2668 FcLangSetCompare compares language coverage for ls_a and ls_b. If they
2669 share any language and territory pair, this function returns FcLangEqual.
2670 If they share a language but differ in which territory that language is
2671 for, this function returns FcLangDifferentTerritory. If they share no
2672 languages in common, this function returns FcLangDifferentLang.
2676 Fontconfig version 2.10.91
2682 FcLangSetContains -- check langset subset relation
2686 #include <fontconfig/fontconfig.h>
2689 FcBool FcLangSetContains(const FcLangSet *ls_a, const FcLangSet *ls_b);
2693 FcLangSetContains returns FcTrue if ls_a contains every language in ls_b.
2694 ls_a will 'contain' a language from ls_b if ls_a has exactly the language,
2695 or either the language or ls_a has no territory.
2699 Fontconfig version 2.10.91
2705 FcLangSetEqual -- test for matching langsets
2709 #include <fontconfig/fontconfig.h>
2712 FcBool FcLangSetEqual(const FcLangSet *ls_a, const FcLangSet *ls_b);
2716 Returns FcTrue if and only if ls_a supports precisely the same language
2717 and territory combinations as ls_b.
2721 Fontconfig version 2.10.91
2727 FcLangSetHash -- return a hash value for a langset
2731 #include <fontconfig/fontconfig.h>
2734 FcChar32 FcLangSetHash(const FcLangSet *ls);
2738 This function returns a value which depends solely on the languages
2739 supported by ls. Any language which equals ls will have the same result
2740 from FcLangSetHash. However, two langsets with the same hash value may not
2745 Fontconfig version 2.10.91
2751 FcLangSetHasLang -- test langset for language support
2755 #include <fontconfig/fontconfig.h>
2758 FcLangResult FcLangSetHasLang(const FcLangSet *ls, const FcChar8 *lang);
2762 FcLangSetHasLang checks whether ls supports lang. If ls has a matching
2763 language and territory pair, this function returns FcLangEqual. If ls has
2764 a matching language but differs in which territory that language is for,
2765 this function returns FcLangDifferentTerritory. If ls has no matching
2766 language, this function returns FcLangDifferentLang.
2770 Fontconfig version 2.10.91
2776 FcGetDefaultLangs -- Get the default languages list
2780 #include <fontconfig/fontconfig.h>
2783 FcStrSet * FcGetDefaultLangs(voidls);
2787 Returns a string set of the default languages according to the environment
2788 variables on the system. This function looks for them in order of FC_LANG,
2789 LC_ALL, LC_CTYPE and LANG then. If there are no valid values in those
2790 environment variables, "en" will be set as fallback.
2794 Fontconfig version 2.10.91
2800 FcGetLangs -- Get list of languages
2804 #include <fontconfig/fontconfig.h>
2807 FcStrSet * FcGetLangs(void);
2811 Returns a string set of all known languages.
2815 Fontconfig version 2.10.91
2821 FcLangNormalize -- Normalize the language string
2825 #include <fontconfig/fontconfig.h>
2828 FcChar8 * FcLangNormalize(const FcChar8 *lang);
2832 Returns a string to make lang suitable on fontconfig.
2836 Fontconfig version 2.10.91
2842 FcLangGetCharSet -- Get character map for a language
2846 #include <fontconfig/fontconfig.h>
2849 const FcCharSet * FcLangGetCharSet(const FcChar8 *lang);
2853 Returns the FcCharMap for a language.
2857 Fontconfig version 2.10.91
2859 --------------------------------------------------------------------------
2865 [89]FcMatrixInit -- initialize an FcMatrix structure
2867 [90]FcMatrixCopy -- Copy a matrix
2869 [91]FcMatrixEqual -- Compare two matrices
2871 [92]FcMatrixMultiply -- Multiply matrices
2873 [93]FcMatrixRotate -- Rotate a matrix
2875 [94]FcMatrixScale -- Scale a matrix
2877 [95]FcMatrixShear -- Shear a matrix
2879 FcMatrix structures hold an affine transformation in matrix form.
2885 FcMatrixInit -- initialize an FcMatrix structure
2889 #include <fontconfig/fontconfig.h>
2892 void FcMatrixInit(FcMatrix *matrix);
2896 FcMatrixInit initializes matrix to the identity matrix.
2900 Fontconfig version 2.10.91
2906 FcMatrixCopy -- Copy a matrix
2910 #include <fontconfig/fontconfig.h>
2913 void FcMatrixCopy(const FcMatrix *matrix);
2917 FcMatrixCopy allocates a new FcMatrix and copies mat into it.
2921 Fontconfig version 2.10.91
2927 FcMatrixEqual -- Compare two matrices
2931 #include <fontconfig/fontconfig.h>
2934 void FcMatrixEqual(const FcMatrix *matrix1, const FcMatrix *matrix2);
2938 FcMatrixEqual compares matrix1 and matrix2 returning FcTrue when they are
2939 equal and FcFalse when they are not.
2943 Fontconfig version 2.10.91
2949 FcMatrixMultiply -- Multiply matrices
2953 #include <fontconfig/fontconfig.h>
2956 void FcMatrixMultiply(FcMatrix *result, const FcMatrix *matrix1, const
2961 FcMatrixMultiply multiplies matrix1 and matrix2 storing the result in
2966 Fontconfig version 2.10.91
2972 FcMatrixRotate -- Rotate a matrix
2976 #include <fontconfig/fontconfig.h>
2979 void FcMatrixRotate(FcMatrix *matrix, double cos, double sin);
2983 FcMatrixRotate rotates matrix by the angle who's sine is sin and cosine is
2984 cos. This is done by multiplying by the matrix:
2991 Fontconfig version 2.10.91
2997 FcMatrixScale -- Scale a matrix
3001 #include <fontconfig/fontconfig.h>
3004 void FcMatrixScale(FcMatrix *matrix, double sx, double dy);
3008 FcMatrixScale multiplies matrix x values by sx and y values by dy. This is
3009 done by multiplying by the matrix:
3016 Fontconfig version 2.10.91
3022 FcMatrixShear -- Shear a matrix
3026 #include <fontconfig/fontconfig.h>
3029 void FcMatrixShear(FcMatrix *matrix, double sh, double sv);
3033 FcMatrixShare shears matrix horizontally by sh and vertically by sv. This
3034 is done by multiplying by the matrix:
3041 Fontconfig version 2.10.91
3043 --------------------------------------------------------------------------
3049 [96]FcConfigCreate -- Create a configuration
3051 [97]FcConfigReference -- Increment config reference count
3053 [98]FcConfigDestroy -- Destroy a configuration
3055 [99]FcConfigSetCurrent -- Set configuration as default
3057 [100]FcConfigGetCurrent -- Return current configuration
3059 [101]FcConfigUptoDate -- Check timestamps on config files
3061 [102]FcConfigHome -- return the current home directory.
3063 [103]FcConfigEnableHome -- controls use of the home directory.
3065 [104]FcConfigBuildFonts -- Build font database
3067 [105]FcConfigGetConfigDirs -- Get config directories
3069 [106]FcConfigGetFontDirs -- Get font directories
3071 [107]FcConfigGetConfigFiles -- Get config files
3073 [108]FcConfigGetCache -- DEPRECATED used to return per-user cache filename
3075 [109]FcConfigGetCacheDirs -- return the list of directories searched for
3078 [110]FcConfigGetFonts -- Get config font set
3080 [111]FcConfigGetBlanks -- Get config blanks
3082 [112]FcConfigGetRescanInterval -- Get config rescan interval
3084 [113]FcConfigSetRescanInterval -- Set config rescan interval
3086 [114]FcConfigAppFontAddFile -- Add font file to font database
3088 [115]FcConfigAppFontAddDir -- Add fonts from directory to font database
3090 [116]FcConfigAppFontClear -- Remove all app fonts from font database
3092 [117]FcConfigSubstituteWithPat -- Execute substitutions
3094 [118]FcConfigSubstitute -- Execute substitutions
3096 [119]FcFontMatch -- Return best font
3098 [120]FcFontSort -- Return list of matching fonts
3100 [121]FcFontRenderPrepare -- Prepare pattern for loading font file
3102 [122]FcFontList -- List fonts
3104 [123]FcConfigFilename -- Find a config file
3106 [124]FcConfigParseAndLoad -- load a configuration file
3108 An FcConfig object holds the internal representation of a configuration.
3109 There is a default configuration which applications may use by passing 0
3110 to any function using the data within an FcConfig.
3116 FcConfigCreate -- Create a configuration
3120 #include <fontconfig/fontconfig.h>
3123 FcConfig * FcConfigCreate(void);
3127 Creates an empty configuration.
3131 Fontconfig version 2.10.91
3137 FcConfigReference -- Increment config reference count
3141 #include <fontconfig/fontconfig.h>
3144 FcConfig * FcConfigReference(FcConfig *config);
3148 Add another reference to config. Configs are freed only when the reference
3149 count reaches zero. If config is NULL, the current configuration is used.
3150 In that case this function will be similar to FcConfigGetCurrent() except
3151 that it increments the reference count before returning and the user is
3152 responsible for destroying the configuration when not needed anymore.
3156 Fontconfig version 2.10.91
3162 FcConfigDestroy -- Destroy a configuration
3166 #include <fontconfig/fontconfig.h>
3169 void FcConfigDestroy(FcConfig *config);
3173 Decrements the config reference count. If all references are gone,
3174 destroys the configuration and any data associated with it. Note that
3175 calling this function with the return from FcConfigGetCurrent will cause a
3176 new configuration to be created for use as current configuration.
3180 Fontconfig version 2.10.91
3186 FcConfigSetCurrent -- Set configuration as default
3190 #include <fontconfig/fontconfig.h>
3193 FcBool FcConfigSetCurrent(FcConfig *config);
3197 Sets the current default configuration to config. Implicitly calls
3198 FcConfigBuildFonts if necessary, returning FcFalse if that call fails.
3202 Fontconfig version 2.10.91
3208 FcConfigGetCurrent -- Return current configuration
3212 #include <fontconfig/fontconfig.h>
3215 FcConfig * FcConfigGetCurrent(void);
3219 Returns the current default configuration.
3223 Fontconfig version 2.10.91
3229 FcConfigUptoDate -- Check timestamps on config files
3233 #include <fontconfig/fontconfig.h>
3236 FcBool FcConfigUptoDate(FcConfig *config);
3240 Checks all of the files related to config and returns whether any of them
3241 has been modified since the configuration was created. If config is NULL,
3242 the current configuration is used.
3246 Fontconfig version 2.10.91
3252 FcConfigHome -- return the current home directory.
3256 #include <fontconfig/fontconfig.h>
3259 FcChar8 * FcConfigHome(void);
3263 Return the current user's home directory, if it is available, and if using
3264 it is enabled, and NULL otherwise. See also FcConfigEnableHome).
3268 Fontconfig version 2.10.91
3274 FcConfigEnableHome -- controls use of the home directory.
3278 #include <fontconfig/fontconfig.h>
3281 FcBool FcConfigEnableHome(FcBool enable);
3285 If enable is FcTrue, then Fontconfig will use various files which are
3286 specified relative to the user's home directory (using the ~ notation in
3287 the configuration). When enable is FcFalse, then all use of the home
3288 directory in these contexts will be disabled. The previous setting of the
3293 Fontconfig version 2.10.91
3299 FcConfigBuildFonts -- Build font database
3303 #include <fontconfig/fontconfig.h>
3306 FcBool FcConfigBuildFonts(FcConfig *config);
3310 Builds the set of available fonts for the given configuration. Note that
3311 any changes to the configuration after this call have indeterminate
3312 effects. Returns FcFalse if this operation runs out of memory. If config
3313 is NULL, the current configuration is used.
3317 Fontconfig version 2.10.91
3319 FcConfigGetConfigDirs
3323 FcConfigGetConfigDirs -- Get config directories
3327 #include <fontconfig/fontconfig.h>
3330 FcStrList * FcConfigGetConfigDirs(FcConfig *config);
3334 Returns the list of font directories specified in the configuration files
3335 for config. Does not include any subdirectories. If config is NULL, the
3336 current configuration is used.
3340 Fontconfig version 2.10.91
3346 FcConfigGetFontDirs -- Get font directories
3350 #include <fontconfig/fontconfig.h>
3353 FcStrList * FcConfigGetFontDirs(FcConfig *config);
3357 Returns the list of font directories in config. This includes the
3358 configured font directories along with any directories below those in the
3359 filesystem. If config is NULL, the current configuration is used.
3363 Fontconfig version 2.10.91
3365 FcConfigGetConfigFiles
3369 FcConfigGetConfigFiles -- Get config files
3373 #include <fontconfig/fontconfig.h>
3376 FcStrList * FcConfigGetConfigFiles(FcConfig *config);
3380 Returns the list of known configuration files used to generate config. If
3381 config is NULL, the current configuration is used.
3385 Fontconfig version 2.10.91
3391 FcConfigGetCache -- DEPRECATED used to return per-user cache filename
3395 #include <fontconfig/fontconfig.h>
3398 FcChar8 * FcConfigGetCache(FcConfig *config);
3402 With fontconfig no longer using per-user cache files, this function now
3403 simply returns NULL to indicate that no per-user file exists.
3407 Fontconfig version 2.10.91
3409 FcConfigGetCacheDirs
3413 FcConfigGetCacheDirs -- return the list of directories searched for cache
3418 #include <fontconfig/fontconfig.h>
3421 FcStrList * FcConfigGetCacheDirs(const FcConfig *config);
3425 FcConfigGetCacheDirs returns a string list containing all of the
3426 directories that fontconfig will search when attempting to load a cache
3427 file for a font directory. If config is NULL, the current configuration is
3432 Fontconfig version 2.10.91
3438 FcConfigGetFonts -- Get config font set
3442 #include <fontconfig/fontconfig.h>
3445 FcFontSet * FcConfigGetFonts(FcConfig *config, FcSetName set);
3449 Returns one of the two sets of fonts from the configuration as specified
3450 by set. This font set is owned by the library and must not be modified or
3451 freed. If config is NULL, the current configuration is used.
3455 Fontconfig version 2.10.91
3461 FcConfigGetBlanks -- Get config blanks
3465 #include <fontconfig/fontconfig.h>
3468 FcBlanks * FcConfigGetBlanks(FcConfig *config);
3472 Returns the FcBlanks object associated with the given configuration, if no
3473 blanks were present in the configuration, this function will return 0. The
3474 returned FcBlanks object if not NULL, is valid as long as the owning
3475 FcConfig is alive. If config is NULL, the current configuration is used.
3479 Fontconfig version 2.10.91
3481 FcConfigGetRescanInterval
3485 FcConfigGetRescanInterval -- Get config rescan interval
3489 #include <fontconfig/fontconfig.h>
3492 int FcConfigGetRescanInterval(FcConfig *config);
3496 Returns the interval between automatic checks of the configuration (in
3497 seconds) specified in config. The configuration is checked during a call
3498 to FcFontList when this interval has passed since the last check. An
3499 interval setting of zero disables automatic checks. If config is NULL, the
3500 current configuration is used.
3504 Fontconfig version 2.10.91
3506 FcConfigSetRescanInterval
3510 FcConfigSetRescanInterval -- Set config rescan interval
3514 #include <fontconfig/fontconfig.h>
3517 FcBool FcConfigSetRescanInterval(FcConfig *config, int rescanInterval);
3521 Sets the rescan interval. Returns FcFalse if the interval cannot be set
3522 (due to allocation failure). Otherwise returns FcTrue. An interval setting
3523 of zero disables automatic checks. If config is NULL, the current
3524 configuration is used.
3528 Fontconfig version 2.10.91
3530 FcConfigAppFontAddFile
3534 FcConfigAppFontAddFile -- Add font file to font database
3538 #include <fontconfig/fontconfig.h>
3541 FcBool FcConfigAppFontAddFile(FcConfig *config, const FcChar8 *file);
3545 Adds an application-specific font to the configuration. Returns FcFalse if
3546 the fonts cannot be added (due to allocation failure). Otherwise returns
3547 FcTrue. If config is NULL, the current configuration is used.
3551 Fontconfig version 2.10.91
3553 FcConfigAppFontAddDir
3557 FcConfigAppFontAddDir -- Add fonts from directory to font database
3561 #include <fontconfig/fontconfig.h>
3564 FcBool FcConfigAppFontAddDir(FcConfig *config, const FcChar8 *dir);
3568 Scans the specified directory for fonts, adding each one found to the
3569 application-specific set of fonts. Returns FcFalse if the fonts cannot be
3570 added (due to allocation failure). Otherwise returns FcTrue. If config is
3571 NULL, the current configuration is used.
3575 Fontconfig version 2.10.91
3577 FcConfigAppFontClear
3581 FcConfigAppFontClear -- Remove all app fonts from font database
3585 #include <fontconfig/fontconfig.h>
3588 void FcConfigAppFontClear(FcConfig *config);
3592 Clears the set of application-specific fonts. If config is NULL, the
3593 current configuration is used.
3597 Fontconfig version 2.10.91
3599 FcConfigSubstituteWithPat
3603 FcConfigSubstituteWithPat -- Execute substitutions
3607 #include <fontconfig/fontconfig.h>
3610 FcBool FcConfigSubstituteWithPat(FcConfig *config, FcPattern *p, FcPattern
3611 *p_pat, FcMatchKind kind);
3615 Performs the sequence of pattern modification operations, if kind is
3616 FcMatchPattern, then those tagged as pattern operations are applied, else
3617 if kind is FcMatchFont, those tagged as font operations are applied and
3618 p_pat is used for <test> elements with target=pattern. Returns FcFalse if
3619 the substitution cannot be performed (due to allocation failure).
3620 Otherwise returns FcTrue. If config is NULL, the current configuration is
3625 Fontconfig version 2.10.91
3631 FcConfigSubstitute -- Execute substitutions
3635 #include <fontconfig/fontconfig.h>
3638 FcBool FcConfigSubstitute(FcConfig *config, FcPattern *p, FcMatchKind
3643 Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns FcFalse if
3644 the substitution cannot be performed (due to allocation failure).
3645 Otherwise returns FcTrue. If config is NULL, the current configuration is
3650 Fontconfig version 2.10.91
3656 FcFontMatch -- Return best font
3660 #include <fontconfig/fontconfig.h>
3663 FcPattern * FcFontMatch(FcConfig *config, FcPattern *p, FcResult *result);
3667 Finds the font in sets most closely matching pattern and returns the
3668 result of FcFontRenderPrepare for that font and the provided pattern. This
3669 function should be called only after FcConfigSubstitute and
3670 FcDefaultSubstitute have been called for p; otherwise the results will not
3671 be correct. If config is NULL, the current configuration is used.
3675 Fontconfig version 2.10.91
3681 FcFontSort -- Return list of matching fonts
3685 #include <fontconfig/fontconfig.h>
3688 FcFontSet * FcFontSort(FcConfig *config, FcPattern *p, FcBool trim,
3689 FcCharSet **csp, FcResult *result);
3693 Returns the list of fonts sorted by closeness to p. If trim is FcTrue,
3694 elements in the list which don't include Unicode coverage not provided by
3695 earlier elements in the list are elided. The union of Unicode coverage of
3696 all of the fonts is returned in csp, if csp is not NULL. This function
3697 should be called only after FcConfigSubstitute and FcDefaultSubstitute
3698 have been called for p; otherwise the results will not be correct.
3700 The returned FcFontSet references FcPattern structures which may be shared
3701 by the return value from multiple FcFontSort calls, applications must not
3702 modify these patterns. Instead, they should be passed, along with p to
3703 FcFontRenderPrepare which combines them into a complete pattern.
3705 The FcFontSet returned by FcFontSort is destroyed by calling
3706 FcFontSetDestroy. If config is NULL, the current configuration is used.
3710 Fontconfig version 2.10.91
3716 FcFontRenderPrepare -- Prepare pattern for loading font file
3720 #include <fontconfig/fontconfig.h>
3723 FcPattern * FcFontRenderPrepare(FcConfig *config, FcPattern *pat,
3728 Creates a new pattern consisting of elements of font not appearing in pat,
3729 elements of pat not appearing in font and the best matching value from pat
3730 for elements appearing in both. The result is passed to
3731 FcConfigSubstituteWithPat with kind FcMatchFont and then returned.
3735 Fontconfig version 2.10.91
3741 FcFontList -- List fonts
3745 #include <fontconfig/fontconfig.h>
3748 FcFontSet * FcFontList(FcConfig *config, FcPattern *p, FcObjectSet *os);
3752 Selects fonts matching p, creates patterns from those fonts containing
3753 only the objects in os and returns the set of unique such patterns. If
3754 config is NULL, the default configuration is checked to be up to date, and
3759 Fontconfig version 2.10.91
3765 FcConfigFilename -- Find a config file
3769 #include <fontconfig/fontconfig.h>
3772 FcChar8 * FcConfigFilename(const FcChar8 *name);
3776 Given the specified external entity name, return the associated filename.
3777 This provides applications a way to convert various configuration file
3778 references into filename form.
3780 A null or empty name indicates that the default configuration file should
3781 be used; which file this references can be overridden with the
3782 FONTCONFIG_FILE environment variable. Next, if the name starts with ~, it
3783 refers to a file in the current users home directory. Otherwise if the
3784 name doesn't start with '/', it refers to a file in the default
3785 configuration directory; the built-in default directory can be overridden
3786 with the FONTCONFIG_PATH environment variable.
3790 Fontconfig version 2.10.91
3792 FcConfigParseAndLoad
3796 FcConfigParseAndLoad -- load a configuration file
3800 #include <fontconfig/fontconfig.h>
3803 FcBool FcConfigParseAndLoad(FcConfig *config, const FcChar8 *file, FcBool
3808 Walks the configuration in 'file' and constructs the internal
3809 representation in 'config'. Any include files referenced from within
3810 'file' will be loaded and parsed. If 'complain' is FcFalse, no warning
3811 will be displayed if 'file' does not exist. Error and warning messages
3812 will be output to stderr. Returns FcFalse if some error occurred while
3813 loading the file, either a parse error, semantic error or allocation
3814 failure. Otherwise returns FcTrue.
3818 Fontconfig version 2.10.91
3820 --------------------------------------------------------------------------
3826 [125]FcNameRegisterObjectTypes -- Register object types
3828 [126]FcNameUnregisterObjectTypes -- Unregister object types
3830 [127]FcNameGetObjectType -- Lookup an object type
3832 Provides for application-specified font name object types so that new
3833 pattern elements can be generated from font names.
3835 FcNameRegisterObjectTypes
3839 FcNameRegisterObjectTypes -- Register object types
3843 #include <fontconfig/fontconfig.h>
3846 FcBool FcNameRegisterObjectTypes(const FcObjectType *types, int ntype);
3850 Deprecated. Does nothing. Returns FcFalse.
3854 Fontconfig version 2.10.91
3856 FcNameUnregisterObjectTypes
3860 FcNameUnregisterObjectTypes -- Unregister object types
3864 #include <fontconfig/fontconfig.h>
3867 FcBool FcNameUnregisterObjectTypes(const FcObjectType *types, int ntype);
3871 Deprecated. Does nothing. Returns FcFalse.
3875 Fontconfig version 2.10.91
3881 FcNameGetObjectType -- Lookup an object type
3885 #include <fontconfig/fontconfig.h>
3888 const FcObjectType * FcNameGetObjectType(const char *object);
3892 Return the object type for the pattern element named object.
3896 Fontconfig version 2.10.91
3898 --------------------------------------------------------------------------
3904 [128]FcNameRegisterConstants -- Register symbolic constants
3906 [129]FcNameUnregisterConstants -- Unregister symbolic constants
3908 [130]FcNameGetConstant -- Lookup symbolic constant
3910 [131]FcNameConstant -- Get the value for a symbolic constant
3912 Provides for application-specified symbolic constants for font names.
3914 FcNameRegisterConstants
3918 FcNameRegisterConstants -- Register symbolic constants
3922 #include <fontconfig/fontconfig.h>
3925 FcBool FcNameRegisterConstants(const FcConstant *consts, int nconsts);
3929 Deprecated. Does nothing. Returns FcFalse.
3933 Fontconfig version 2.10.91
3935 FcNameUnregisterConstants
3939 FcNameUnregisterConstants -- Unregister symbolic constants
3943 #include <fontconfig/fontconfig.h>
3946 FcBool FcNameUnregisterConstants(const FcConstant *consts, int nconsts);
3950 Deprecated. Does nothing. Returns FcFalse.
3954 Fontconfig version 2.10.91
3960 FcNameGetConstant -- Lookup symbolic constant
3964 #include <fontconfig/fontconfig.h>
3967 const FcConstant * FcNameGetConstant(FcChar8 *string);
3971 Return the FcConstant structure related to symbolic constant string.
3975 Fontconfig version 2.10.91
3981 FcNameConstant -- Get the value for a symbolic constant
3985 #include <fontconfig/fontconfig.h>
3988 FcBool FcNameConstant(FcChar8 *string, int *result);
3992 Returns whether a symbolic constant with name string is registered,
3993 placing the value of the constant in result if present.
3997 Fontconfig version 2.10.91
3999 --------------------------------------------------------------------------
4005 [132]FcBlanksCreate -- Create an FcBlanks
4007 [133]FcBlanksDestroy -- Destroy and FcBlanks
4009 [134]FcBlanksAdd -- Add a character to an FcBlanks
4011 [135]FcBlanksIsMember -- Query membership in an FcBlanks
4013 An FcBlanks object holds a list of Unicode chars which are expected to be
4014 blank when drawn. When scanning new fonts, any glyphs which are empty and
4015 not in this list will be assumed to be broken and not placed in the
4016 FcCharSet associated with the font. This provides a significantly more
4017 accurate CharSet for applications.
4023 FcBlanksCreate -- Create an FcBlanks
4027 #include <fontconfig/fontconfig.h>
4030 FcBlanks * FcBlanksCreate(void);
4034 Creates an empty FcBlanks object.
4038 Fontconfig version 2.10.91
4044 FcBlanksDestroy -- Destroy and FcBlanks
4048 #include <fontconfig/fontconfig.h>
4051 void FcBlanksDestroy(FcBlanks *b);
4055 Destroys an FcBlanks object, freeing any associated memory.
4059 Fontconfig version 2.10.91
4065 FcBlanksAdd -- Add a character to an FcBlanks
4069 #include <fontconfig/fontconfig.h>
4072 FcBool FcBlanksAdd(FcBlanks *b, FcChar32 ucs4);
4076 Adds a single character to an FcBlanks object, returning FcFalse if this
4077 process ran out of memory.
4081 Fontconfig version 2.10.91
4087 FcBlanksIsMember -- Query membership in an FcBlanks
4091 #include <fontconfig/fontconfig.h>
4094 FcBool FcBlanksIsMember(FcBlanks *b, FcChar32 ucs4);
4098 Returns whether the specified FcBlanks object contains the indicated
4103 Fontconfig version 2.10.91
4105 --------------------------------------------------------------------------
4111 [136]FcAtomicCreate -- create an FcAtomic object
4113 [137]FcAtomicLock -- lock a file
4115 [138]FcAtomicNewFile -- return new temporary file name
4117 [139]FcAtomicOrigFile -- return original file name
4119 [140]FcAtomicReplaceOrig -- replace original with new
4121 [141]FcAtomicDeleteNew -- delete new file
4123 [142]FcAtomicUnlock -- unlock a file
4125 [143]FcAtomicDestroy -- destroy an FcAtomic object
4127 These functions provide a safe way to update configuration files, allowing
4128 ongoing reading of the old configuration file while locked for writing and
4129 ensuring that a consistent and complete version of the configuration file
4130 is always available.
4136 FcAtomicCreate -- create an FcAtomic object
4140 #include <fontconfig/fontconfig.h>
4143 FcAtomic * FcAtomicCreate(const FcChar8 *file);
4147 Creates a data structure containing data needed to control access to file.
4148 Writing is done to a separate file. Once that file is complete, the
4149 original configuration file is atomically replaced so that reading process
4150 always see a consistent and complete file without the need to lock for
4155 Fontconfig version 2.10.91
4161 FcAtomicLock -- lock a file
4165 #include <fontconfig/fontconfig.h>
4168 FcBool FcAtomicLock(FcAtomic *atomic);
4172 Attempts to lock the file referenced by atomic. Returns FcFalse if the
4173 file is already locked, else returns FcTrue and leaves the file locked.
4177 Fontconfig version 2.10.91
4183 FcAtomicNewFile -- return new temporary file name
4187 #include <fontconfig/fontconfig.h>
4190 FcChar8 * FcAtomicNewFile(FcAtomic *atomic);
4194 Returns the filename for writing a new version of the file referenced by
4199 Fontconfig version 2.10.91
4205 FcAtomicOrigFile -- return original file name
4209 #include <fontconfig/fontconfig.h>
4212 FcChar8 * FcAtomicOrigFile(FcAtomic *atomic);
4216 Returns the file referenced by atomic.
4220 Fontconfig version 2.10.91
4226 FcAtomicReplaceOrig -- replace original with new
4230 #include <fontconfig/fontconfig.h>
4233 FcBool FcAtomicReplaceOrig(FcAtomic *atomic);
4237 Replaces the original file referenced by atomic with the new file. Returns
4238 FcFalse if the file cannot be replaced due to permission issues in the
4239 filesystem. Otherwise returns FcTrue.
4243 Fontconfig version 2.10.91
4249 FcAtomicDeleteNew -- delete new file
4253 #include <fontconfig/fontconfig.h>
4256 void FcAtomicDeleteNew(FcAtomic *atomic);
4260 Deletes the new file. Used in error recovery to back out changes.
4264 Fontconfig version 2.10.91
4270 FcAtomicUnlock -- unlock a file
4274 #include <fontconfig/fontconfig.h>
4277 void FcAtomicUnlock(FcAtomic *atomic);
4285 Fontconfig version 2.10.91
4291 FcAtomicDestroy -- destroy an FcAtomic object
4295 #include <fontconfig/fontconfig.h>
4298 void FcAtomicDestroy(FcAtomic *atomic);
4306 Fontconfig version 2.10.91
4308 --------------------------------------------------------------------------
4310 File and Directory routines
4314 [144]FcFileScan -- scan a font file
4316 [145]FcFileIsDir -- check whether a file is a directory
4318 [146]FcDirScan -- scan a font directory without caching it
4320 [147]FcDirSave -- DEPRECATED: formerly used to save a directory cache
4322 [148]FcDirCacheUnlink -- Remove all caches related to dir
4324 [149]FcDirCacheValid -- check directory cache
4326 [150]FcDirCacheLoad -- load a directory cache
4328 [151]FcDirCacheRead -- read or construct a directory cache
4330 [152]FcDirCacheLoadFile -- load a cache file
4332 [153]FcDirCacheUnload -- unload a cache file
4334 These routines work with font files and directories, including font
4335 directory cache files.
4341 FcFileScan -- scan a font file
4345 #include <fontconfig/fontconfig.h>
4348 FcBool FcFileScan(FcFontSet *set, FcStrSet *dirs, FcFileCache *cache,
4349 FcBlanks *blanks, const FcChar8 *file, FcBool force);
4353 Scans a single file and adds all fonts found to set. If force is FcTrue,
4354 then the file is scanned even if associated information is found in cache.
4355 If file is a directory, it is added to dirs. Whether fonts are found
4356 depends on fontconfig policy as well as the current configuration.
4357 Internally, fontconfig will ignore BDF and PCF fonts which are not in
4358 Unicode (or the effectively equivalent ISO Latin-1) encoding as those are
4359 not usable by Unicode-based applications. The configuration can ignore
4360 fonts based on filename or contents of the font file itself. Returns
4361 FcFalse if any of the fonts cannot be added (due to allocation failure).
4362 Otherwise returns FcTrue.
4366 Fontconfig version 2.10.91
4372 FcFileIsDir -- check whether a file is a directory
4376 #include <fontconfig/fontconfig.h>
4379 FcBool FcFileIsDir(const FcChar8 *file);
4383 Returns FcTrue if file is a directory, otherwise returns FcFalse.
4387 Fontconfig version 2.10.91
4393 FcDirScan -- scan a font directory without caching it
4397 #include <fontconfig/fontconfig.h>
4400 FcBool FcDirScan(FcFontSet *set, FcStrSet *dirs, FcFileCache *cache,
4401 FcBlanks *blanks, const FcChar8 *dir, FcBool force);
4405 If cache is not zero or if force is FcFalse, this function currently
4406 returns FcFalse. Otherwise, it scans an entire directory and adds all
4407 fonts found to set. Any subdirectories found are added to dirs. Calling
4408 this function does not create any cache files. Use FcDirCacheRead() if
4413 Fontconfig version 2.10.91
4419 FcDirSave -- DEPRECATED: formerly used to save a directory cache
4423 #include <fontconfig/fontconfig.h>
4426 FcBool FcDirSave(FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir);
4430 This function now does nothing aside from returning FcFalse. It used to
4431 creates the per-directory cache file for dir and populates it with the
4432 fonts in set and subdirectories in dirs. All of this functionality is now
4433 automatically managed by FcDirCacheLoad and FcDirCacheRead.
4437 Fontconfig version 2.10.91
4443 FcDirCacheUnlink -- Remove all caches related to dir
4447 #include <fontconfig/fontconfig.h>
4450 FcBool FcDirCacheUnlink(const FcChar8 *dir, FcConfig *config);
4454 Scans the cache directories in config, removing any instances of the cache
4455 file for dir. Returns FcFalse when some internal error occurs (out of
4456 memory, etc). Errors actually unlinking any files are ignored.
4460 Fontconfig version 2.10.91
4466 FcDirCacheValid -- check directory cache
4470 #include <fontconfig/fontconfig.h>
4473 FcBool FcDirCacheValid(const FcChar8 *dir);
4477 Returns FcTrue if dir has an associated valid cache file, else returns
4482 Fontconfig version 2.10.91
4488 FcDirCacheLoad -- load a directory cache
4492 #include <fontconfig/fontconfig.h>
4495 FcCache * FcDirCacheLoad(const FcChar8 *dir, FcConfig *config, FcChar8
4500 Loads the cache related to dir. If no cache file exists, returns NULL. The
4501 name of the cache file is returned in cache_file, unless that is NULL. See
4502 also FcDirCacheRead.
4506 Fontconfig version 2.10.91
4512 FcDirCacheRead -- read or construct a directory cache
4516 #include <fontconfig/fontconfig.h>
4519 FcCache * FcDirCacheRead(const FcChar8 *dir, FcBool force, FcConfig
4524 This returns a cache for dir. If force is FcFalse, then an existing, valid
4525 cache file will be used. Otherwise, a new cache will be created by
4526 scanning the directory and that returned.
4530 Fontconfig version 2.10.91
4536 FcDirCacheLoadFile -- load a cache file
4540 #include <fontconfig/fontconfig.h>
4543 FcCache * FcDirCacheLoadFile(const FcChar8 *cache_file, struct stat
4548 This function loads a directory cache from cache_file. If file_stat is
4549 non-NULL, it will be filled with the results of stat(2) on the cache file.
4553 Fontconfig version 2.10.91
4559 FcDirCacheUnload -- unload a cache file
4563 #include <fontconfig/fontconfig.h>
4566 void FcDirCacheUnload(FcCache *cache);
4570 This function dereferences cache. When no other references to it remain,
4571 all memory associated with the cache will be freed.
4575 Fontconfig version 2.10.91
4577 --------------------------------------------------------------------------
4583 [154]FcCacheDir -- Return directory of cache
4585 [155]FcCacheCopySet -- Returns a copy of the fontset from cache
4587 [156]FcCacheSubdir -- Return the i'th subdirectory.
4589 [157]FcCacheNumSubdir -- Return the number of subdirectories in cache.
4591 [158]FcCacheNumFont -- Returns the number of fonts in cache.
4593 [159]FcDirCacheClean -- This tries to clean up the cache directory of
4594 cache_dir. This returns FcTrue if the operation is successfully complete.
4597 [160]FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory.
4599 These routines work with font directory caches, accessing their contents
4600 in limited ways. It is not expected that normal applications will need to
4601 use these functions.
4607 FcCacheDir -- Return directory of cache
4611 #include <fontconfig/fontconfig.h>
4614 const FcChar8 * FcCacheDir(const FcCache *cache);
4618 This function returns the directory from which the cache was constructed.
4622 Fontconfig version 2.10.91
4628 FcCacheCopySet -- Returns a copy of the fontset from cache
4632 #include <fontconfig/fontconfig.h>
4635 FcFontSet * FcCacheCopySet(const FcCache *cache);
4639 The returned fontset contains each of the font patterns from cache. This
4640 fontset may be modified, but the patterns from the cache are read-only.
4644 Fontconfig version 2.10.91
4650 FcCacheSubdir -- Return the i'th subdirectory.
4654 #include <fontconfig/fontconfig.h>
4657 const FcChar8 * FcCacheSubdir(const FcCache *cache, inti);
4661 The set of subdirectories stored in a cache file are indexed by this
4662 function, i should range from 0 to n-1, where n is the return value from
4667 Fontconfig version 2.10.91
4673 FcCacheNumSubdir -- Return the number of subdirectories in cache.
4677 #include <fontconfig/fontconfig.h>
4680 int FcCacheNumSubdir(const FcCache *cache);
4684 This returns the total number of subdirectories in the cache.
4688 Fontconfig version 2.10.91
4694 FcCacheNumFont -- Returns the number of fonts in cache.
4698 #include <fontconfig/fontconfig.h>
4701 int FcCacheNumFont(const FcCache *cache);
4705 This returns the number of fonts which would be included in the return
4706 from FcCacheCopySet.
4710 Fontconfig version 2.10.91
4716 FcDirCacheClean -- This tries to clean up the cache directory of
4717 cache_dir. This returns FcTrue if the operation is successfully complete.
4722 #include <fontconfig/fontconfig.h>
4725 FcBool FcDirCacheClean(const FcChar8 *cache_dir, FcBoolverbose);
4733 Fontconfig version 2.10.91
4735 FcCacheCreateTagFile
4739 FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory.
4743 #include <fontconfig/fontconfig.h>
4746 void FcCacheCreateTagFile(const FcConfig *config);
4750 This tries to create CACHEDIR.TAG file at the cache directory registered
4755 Fontconfig version 2.10.91
4757 --------------------------------------------------------------------------
4759 FcStrSet and FcStrList
4763 [161]FcStrSetCreate -- create a string set
4765 [162]FcStrSetMember -- check set for membership
4767 [163]FcStrSetEqual -- check sets for equality
4769 [164]FcStrSetAdd -- add to a string set
4771 [165]FcStrSetAddFilename -- add a filename to a string set
4773 [166]FcStrSetDel -- delete from a string set
4775 [167]FcStrSetDestroy -- destroy a string set
4777 [168]FcStrListCreate -- create a string iterator
4779 [169]FcStrListNext -- get next string in iteration
4781 [170]FcStrListDone -- destroy a string iterator
4783 A data structure for enumerating strings, used to list directories while
4784 scanning the configuration as directories are added while scanning.
4790 FcStrSetCreate -- create a string set
4794 #include <fontconfig/fontconfig.h>
4797 FcStrSet * FcStrSetCreate(void);
4801 Create an empty set.
4805 Fontconfig version 2.10.91
4811 FcStrSetMember -- check set for membership
4815 #include <fontconfig/fontconfig.h>
4818 FcBool FcStrSetMember(FcStrSet *set, const FcChar8 *s);
4822 Returns whether s is a member of set.
4826 Fontconfig version 2.10.91
4832 FcStrSetEqual -- check sets for equality
4836 #include <fontconfig/fontconfig.h>
4839 FcBool FcStrSetEqual(FcStrSet *set_a, FcStrSet *set_b);
4843 Returns whether set_a contains precisely the same strings as set_b.
4844 Ordering of strings within the two sets is not considered.
4848 Fontconfig version 2.10.91
4854 FcStrSetAdd -- add to a string set
4858 #include <fontconfig/fontconfig.h>
4861 FcBool FcStrSetAdd(FcStrSet *set, const FcChar8 *s);
4865 Adds a copy of s to set.
4869 Fontconfig version 2.10.91
4875 FcStrSetAddFilename -- add a filename to a string set
4879 #include <fontconfig/fontconfig.h>
4882 FcBool FcStrSetAddFilename(FcStrSet *set, const FcChar8 *s);
4886 Adds a copy s to set, The copy is created with FcStrCopyFilename so that
4887 leading '~' values are replaced with the value of the HOME environment
4892 Fontconfig version 2.10.91
4898 FcStrSetDel -- delete from a string set
4902 #include <fontconfig/fontconfig.h>
4905 FcBool FcStrSetDel(FcStrSet *set, const FcChar8 *s);
4909 Removes s from set, returning FcTrue if s was a member else FcFalse.
4913 Fontconfig version 2.10.91
4919 FcStrSetDestroy -- destroy a string set
4923 #include <fontconfig/fontconfig.h>
4926 void FcStrSetDestroy(FcStrSet *set);
4934 Fontconfig version 2.10.91
4940 FcStrListCreate -- create a string iterator
4944 #include <fontconfig/fontconfig.h>
4947 FcStrList * FcStrListCreate(FcStrSet *set);
4951 Creates an iterator to list the strings in set.
4955 Fontconfig version 2.10.91
4961 FcStrListNext -- get next string in iteration
4965 #include <fontconfig/fontconfig.h>
4968 FcChar8 * FcStrListNext(FcStrList *list);
4972 Returns the next string in set.
4976 Fontconfig version 2.10.91
4982 FcStrListDone -- destroy a string iterator
4986 #include <fontconfig/fontconfig.h>
4989 void FcStrListDone(FcStrList *list);
4993 Destroys the enumerator list.
4997 Fontconfig version 2.10.91
4999 --------------------------------------------------------------------------
5005 [171]FcUtf8ToUcs4 -- convert UTF-8 to UCS4
5007 [172]FcUcs4ToUtf8 -- convert UCS4 to UTF-8
5009 [173]FcUtf8Len -- count UTF-8 encoded chars
5011 [174]FcUtf16ToUcs4 -- convert UTF-16 to UCS4
5013 [175]FcUtf16Len -- count UTF-16 encoded chars
5015 [176]FcIsLower -- check for lower case ASCII character
5017 [177]FcIsUpper -- check for upper case ASCII character
5019 [178]FcToLower -- convert upper case ASCII to lower case
5021 [179]FcStrCopy -- duplicate a string
5023 [180]FcStrDowncase -- create a lower case translation of a string
5025 [181]FcStrCopyFilename -- create a complete path from a filename
5027 [182]FcStrCmp -- compare UTF-8 strings
5029 [183]FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case
5031 [184]FcStrStr -- locate UTF-8 substring
5033 [185]FcStrStrIgnoreCase -- locate UTF-8 substring ignoring ASCII case
5035 [186]FcStrPlus -- concatenate two strings
5037 [187]FcStrFree -- free a string
5039 [188]FcStrDirname -- directory part of filename
5041 [189]FcStrBasename -- last component of filename
5043 Fontconfig manipulates many UTF-8 strings represented with the FcChar8
5044 type. These functions are exposed to help applications deal with these
5045 UTF-8 strings in a locale-insensitive manner.
5051 FcUtf8ToUcs4 -- convert UTF-8 to UCS4
5055 #include <fontconfig/fontconfig.h>
5058 int FcUtf8ToUcs4(FcChar8 *src, FcChar32 *dst, int len);
5062 Converts the next Unicode char from src into dst and returns the number of
5063 bytes containing the char. src must be at least len bytes long.
5067 Fontconfig version 2.10.91
5073 FcUcs4ToUtf8 -- convert UCS4 to UTF-8
5077 #include <fontconfig/fontconfig.h>
5080 int FcUcs4ToUtf8(FcChar32 src, FcChar8 dst[FC_UTF8_MAX_LEN]);
5084 Converts the Unicode char from src into dst and returns the number of
5085 bytes needed to encode the char.
5089 Fontconfig version 2.10.91
5095 FcUtf8Len -- count UTF-8 encoded chars
5099 #include <fontconfig/fontconfig.h>
5102 FcBool FcUtf8Len(FcChar8 *src, int len, int *nchar, int *wchar);
5106 Counts the number of Unicode chars in len bytes of src. Places that count
5107 in nchar. wchar contains 1, 2 or 4 depending on the number of bytes needed
5108 to hold the largest Unicode char counted. The return value indicates
5109 whether src is a well-formed UTF8 string.
5113 Fontconfig version 2.10.91
5119 FcUtf16ToUcs4 -- convert UTF-16 to UCS4
5123 #include <fontconfig/fontconfig.h>
5126 int FcUtf16ToUcs4(FcChar8 *src, FcEndian endian, FcChar32 *dst, int len);
5130 Converts the next Unicode char from src into dst and returns the number of
5131 bytes containing the char. src must be at least len bytes long. Bytes of
5132 src are combined into 16-bit units according to endian.
5136 Fontconfig version 2.10.91
5142 FcUtf16Len -- count UTF-16 encoded chars
5146 #include <fontconfig/fontconfig.h>
5149 FcBool FcUtf16Len(FcChar8 *src, FcEndian endian, int len, int *nchar, int
5154 Counts the number of Unicode chars in len bytes of src. Bytes of src are
5155 combined into 16-bit units according to endian. Places that count in
5156 nchar. wchar contains 1, 2 or 4 depending on the number of bytes needed to
5157 hold the largest Unicode char counted. The return value indicates whether
5158 string is a well-formed UTF16 string.
5162 Fontconfig version 2.10.91
5168 FcIsLower -- check for lower case ASCII character
5172 #include <fontconfig/fontconfig.h>
5175 FcBool FcIsLower(FcChar8c);
5179 This macro checks whether c is an lower case ASCII letter.
5183 Fontconfig version 2.10.91
5189 FcIsUpper -- check for upper case ASCII character
5193 #include <fontconfig/fontconfig.h>
5196 FcBool FcIsUpper(FcChar8c);
5200 This macro checks whether c is a upper case ASCII letter.
5204 Fontconfig version 2.10.91
5210 FcToLower -- convert upper case ASCII to lower case
5214 #include <fontconfig/fontconfig.h>
5217 FcChar8 FcToLower(FcChar8c);
5221 This macro converts upper case ASCII c to the equivalent lower case
5226 Fontconfig version 2.10.91
5232 FcStrCopy -- duplicate a string
5236 #include <fontconfig/fontconfig.h>
5239 FcChar8 * FcStrCopy(const FcChar8 *s);
5243 Allocates memory, copies s and returns the resulting buffer. Yes, this is
5244 strdup, but that function isn't available on every platform.
5248 Fontconfig version 2.10.91
5254 FcStrDowncase -- create a lower case translation of a string
5258 #include <fontconfig/fontconfig.h>
5261 FcChar8 * FcStrDowncase(const FcChar8 *s);
5265 Allocates memory, copies s, converting upper case letters to lower case
5266 and returns the allocated buffer.
5270 Fontconfig version 2.10.91
5276 FcStrCopyFilename -- create a complete path from a filename
5280 #include <fontconfig/fontconfig.h>
5283 FcChar8 * FcStrCopyFilename(const FcChar8 *s);
5287 FcStrCopyFilename constructs an absolute pathname from s. It converts any
5288 leading '~' characters in to the value of the HOME environment variable,
5289 and any relative paths are converted to absolute paths using the current
5290 working directory. Sequences of '/' characters are converted to a single
5291 '/', and names containing the current directory '.' or parent directory
5292 '..' are correctly reconstructed. Returns NULL if '~' is the leading
5293 character and HOME is unset or disabled (see FcConfigEnableHome).
5297 Fontconfig version 2.10.91
5303 FcStrCmp -- compare UTF-8 strings
5307 #include <fontconfig/fontconfig.h>
5310 int FcStrCmp(const FcChar8 *s1, const FcChar8 *s2);
5314 Returns the usual <0, 0, >0 result of comparing s1 and s2.
5318 Fontconfig version 2.10.91
5324 FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case
5328 #include <fontconfig/fontconfig.h>
5331 int FcStrCmpIgnoreCase(const FcChar8 *s1, const FcChar8 *s2);
5335 Returns the usual <0, 0, >0 result of comparing s1 and s2. This test is
5336 case-insensitive for all proper UTF-8 encoded strings.
5340 Fontconfig version 2.10.91
5346 FcStrStr -- locate UTF-8 substring
5350 #include <fontconfig/fontconfig.h>
5353 FcChar8 * FcStrStr(const FcChar8 *s1, const FcChar8 *s2);
5357 Returns the location of s2 in s1. Returns NULL if s2 is not present in s1.
5358 This test will operate properly with UTF8 encoded strings.
5362 Fontconfig version 2.10.91
5368 FcStrStrIgnoreCase -- locate UTF-8 substring ignoring ASCII case
5372 #include <fontconfig/fontconfig.h>
5375 FcChar8 * FcStrStrIgnoreCase(const FcChar8 *s1, const FcChar8 *s2);
5379 Returns the location of s2 in s1, ignoring case. Returns NULL if s2 is not
5380 present in s1. This test is case-insensitive for all proper UTF-8 encoded
5385 Fontconfig version 2.10.91
5391 FcStrPlus -- concatenate two strings
5395 #include <fontconfig/fontconfig.h>
5398 FcChar8 * FcStrPlus(const FcChar8 *s1, const FcChar8 *s2);
5402 This function allocates new storage and places the concatenation of s1 and
5403 s2 there, returning the new string.
5407 Fontconfig version 2.10.91
5413 FcStrFree -- free a string
5417 #include <fontconfig/fontconfig.h>
5420 void FcStrFree(FcChar8 *s);
5424 This is just a wrapper around free(3) which helps track memory usage of
5425 strings within the fontconfig library.
5429 Fontconfig version 2.10.91
5435 FcStrDirname -- directory part of filename
5439 #include <fontconfig/fontconfig.h>
5442 FcChar8 * FcStrDirname(const FcChar8 *file);
5446 Returns the directory containing file. This is returned in newly allocated
5447 storage which should be freed when no longer needed.
5451 Fontconfig version 2.10.91
5457 FcStrBasename -- last component of filename
5461 #include <fontconfig/fontconfig.h>
5464 FcChar8 * FcStrBasename(const FcChar8 *file);
5468 Returns the filename of file stripped of any leading directory names. This
5469 is returned in newly allocated storage which should be freed when no
5474 Fontconfig version 2.10.91
5479 1. file:///tmp/html-l8lfPm#AEN16
5480 2. file:///tmp/html-l8lfPm#AEN19
5481 3. file:///tmp/html-l8lfPm#AEN31
5482 4. file:///tmp/html-l8lfPm#AEN102
5483 5. file:///tmp/html-l8lfPm#FCINITLOADCONFIG
5484 6. file:///tmp/html-l8lfPm#FCINITLOADCONFIGANDFONTS
5485 7. file:///tmp/html-l8lfPm#FCINIT
5486 8. file:///tmp/html-l8lfPm#FCFINI
5487 9. file:///tmp/html-l8lfPm#FCGETVERSION
5488 10. file:///tmp/html-l8lfPm#FCINITREINITIALIZE
5489 11. file:///tmp/html-l8lfPm#FCINITBRINGUPTODATE
5490 12. file:///tmp/html-l8lfPm#FCPATTERNCREATE
5491 13. file:///tmp/html-l8lfPm#FCPATTERNDUPLICATE
5492 14. file:///tmp/html-l8lfPm#FCPATTERNREFERENCE
5493 15. file:///tmp/html-l8lfPm#FCPATTERNDESTROY
5494 16. file:///tmp/html-l8lfPm#FCPATTERNEQUAL
5495 17. file:///tmp/html-l8lfPm#FCPATTERNEQUALSUBSET
5496 18. file:///tmp/html-l8lfPm#FCPATTERNFILTER
5497 19. file:///tmp/html-l8lfPm#FCPATTERNHASH
5498 20. file:///tmp/html-l8lfPm#FCPATTERNADD
5499 21. file:///tmp/html-l8lfPm#FCPATTERNADDWEAK
5500 22. file:///tmp/html-l8lfPm#FCPATTERNADD-TYPE
5501 23. file:///tmp/html-l8lfPm#FCPATTERNGET
5502 24. file:///tmp/html-l8lfPm#FCPATTERNGET-TYPE
5503 25. file:///tmp/html-l8lfPm#FCPATTERNBUILD
5504 26. file:///tmp/html-l8lfPm#FCPATTERNDEL
5505 27. file:///tmp/html-l8lfPm#FCPATTERNREMOVE
5506 28. file:///tmp/html-l8lfPm#FCPATTERNPRINT
5507 29. file:///tmp/html-l8lfPm#FCDEFAULTSUBSTITUTE
5508 30. file:///tmp/html-l8lfPm#FCNAMEPARSE
5509 31. file:///tmp/html-l8lfPm#FCNAMEUNPARSE
5510 32. file:///tmp/html-l8lfPm#FCPATTERNFORMAT
5511 33. file:///tmp/html-l8lfPm#FCFONTSETCREATE
5512 34. file:///tmp/html-l8lfPm#FCFONTSETDESTROY
5513 35. file:///tmp/html-l8lfPm#FCFONTSETADD
5514 36. file:///tmp/html-l8lfPm#FCFONTSETLIST
5515 37. file:///tmp/html-l8lfPm#FCFONTSETMATCH
5516 38. file:///tmp/html-l8lfPm#FCFONTSETPRINT
5517 39. file:///tmp/html-l8lfPm#FCFONTSETSORT
5518 40. file:///tmp/html-l8lfPm#FCFONTSETSORTDESTROY
5519 41. file:///tmp/html-l8lfPm#FCOBJECTSETCREATE
5520 42. file:///tmp/html-l8lfPm#FCOBJECTSETADD
5521 43. file:///tmp/html-l8lfPm#FCOBJECTSETDESTROY
5522 44. file:///tmp/html-l8lfPm#FCOBJECTSETBUILD
5523 45. file:///tmp/html-l8lfPm#FCFREETYPECHARINDEX
5524 46. file:///tmp/html-l8lfPm#FCFREETYPECHARSET
5525 47. file:///tmp/html-l8lfPm#FCFREETYPECHARSETANDSPACING
5526 48. file:///tmp/html-l8lfPm#FCFREETYPEQUERY
5527 49. file:///tmp/html-l8lfPm#FCFREETYPEQUERYFACE
5528 50. file:///tmp/html-l8lfPm#FCVALUEDESTROY
5529 51. file:///tmp/html-l8lfPm#FCVALUESAVE
5530 52. file:///tmp/html-l8lfPm#FCVALUEPRINT
5531 53. file:///tmp/html-l8lfPm#FCVALUEEQUAL
5532 54. file:///tmp/html-l8lfPm#FCCHARSETCREATE
5533 55. file:///tmp/html-l8lfPm#FCCHARSETDESTROY
5534 56. file:///tmp/html-l8lfPm#FCCHARSETADDCHAR
5535 57. file:///tmp/html-l8lfPm#FCCHARSETDELCHAR
5536 58. file:///tmp/html-l8lfPm#FCCHARSETCOPY
5537 59. file:///tmp/html-l8lfPm#FCCHARSETEQUAL
5538 60. file:///tmp/html-l8lfPm#FCCHARSETINTERSECT
5539 61. file:///tmp/html-l8lfPm#FCCHARSETUNION
5540 62. file:///tmp/html-l8lfPm#FCCHARSETSUBTRACT
5541 63. file:///tmp/html-l8lfPm#FCCHARSETMERGE
5542 64. file:///tmp/html-l8lfPm#FCCHARSETHASCHAR
5543 65. file:///tmp/html-l8lfPm#FCCHARSETCOUNT
5544 66. file:///tmp/html-l8lfPm#FCCHARSETINTERSECTCOUNT
5545 67. file:///tmp/html-l8lfPm#FCCHARSETSUBTRACTCOUNT
5546 68. file:///tmp/html-l8lfPm#FCCHARSETISSUBSET
5547 69. file:///tmp/html-l8lfPm#FCCHARSETFIRSTPAGE
5548 70. file:///tmp/html-l8lfPm#FCCHARSETNEXTPAGE
5549 71. file:///tmp/html-l8lfPm#FCCHARSETCOVERAGE
5550 72. file:///tmp/html-l8lfPm#FCCHARSETNEW
5551 73. file:///tmp/html-l8lfPm#FCLANGSETCREATE
5552 74. file:///tmp/html-l8lfPm#FCLANGSETDESTROY
5553 75. file:///tmp/html-l8lfPm#FCLANGSETCOPY
5554 76. file:///tmp/html-l8lfPm#FCLANGSETADD
5555 77. file:///tmp/html-l8lfPm#FCLANGSETDEL
5556 78. file:///tmp/html-l8lfPm#FCLANGSETUNION
5557 79. file:///tmp/html-l8lfPm#FCLANGSETSUBTRACT
5558 80. file:///tmp/html-l8lfPm#FCLANGSETCOMPARE
5559 81. file:///tmp/html-l8lfPm#FCLANGSETCONTAINS
5560 82. file:///tmp/html-l8lfPm#FCLANGSETEQUAL
5561 83. file:///tmp/html-l8lfPm#FCLANGSETHASH
5562 84. file:///tmp/html-l8lfPm#FCLANGSETHASLANG
5563 85. file:///tmp/html-l8lfPm#FCGETDEFAULTLANGS
5564 86. file:///tmp/html-l8lfPm#FCGETLANGS
5565 87. file:///tmp/html-l8lfPm#FCLANGNORMALIZE
5566 88. file:///tmp/html-l8lfPm#FCLANGGETCHARSET
5567 89. file:///tmp/html-l8lfPm#FCMATRIXINIT
5568 90. file:///tmp/html-l8lfPm#FCMATRIXCOPY
5569 91. file:///tmp/html-l8lfPm#FCMATRIXEQUAL
5570 92. file:///tmp/html-l8lfPm#FCMATRIXMULTIPLY
5571 93. file:///tmp/html-l8lfPm#FCMATRIXROTATE
5572 94. file:///tmp/html-l8lfPm#FCMATRIXSCALE
5573 95. file:///tmp/html-l8lfPm#FCMATRIXSHEAR
5574 96. file:///tmp/html-l8lfPm#FCCONFIGCREATE
5575 97. file:///tmp/html-l8lfPm#FCCONFIGREFERENCE
5576 98. file:///tmp/html-l8lfPm#FCCONFIGDESTROY
5577 99. file:///tmp/html-l8lfPm#FCCONFIGSETCURRENT
5578 100. file:///tmp/html-l8lfPm#FCCONFIGGETCURRENT
5579 101. file:///tmp/html-l8lfPm#FCCONFIGUPTODATE
5580 102. file:///tmp/html-l8lfPm#FCCONFIGHOME
5581 103. file:///tmp/html-l8lfPm#FCCONFIGENABLEHOME
5582 104. file:///tmp/html-l8lfPm#FCCONFIGBUILDFONTS
5583 105. file:///tmp/html-l8lfPm#FCCONFIGGETCONFIGDIRS
5584 106. file:///tmp/html-l8lfPm#FCCONFIGGETFONTDIRS
5585 107. file:///tmp/html-l8lfPm#FCCONFIGGETCONFIGFILES
5586 108. file:///tmp/html-l8lfPm#FCCONFIGGETCACHE
5587 109. file:///tmp/html-l8lfPm#FCCONFIGGETCACHEDIRS
5588 110. file:///tmp/html-l8lfPm#FCCONFIGGETFONTS
5589 111. file:///tmp/html-l8lfPm#FCCONFIGGETBLANKS
5590 112. file:///tmp/html-l8lfPm#FCCONFIGGETRESCANINTERVAL
5591 113. file:///tmp/html-l8lfPm#FCCONFIGSETRESCANINTERVAL
5592 114. file:///tmp/html-l8lfPm#FCCONFIGAPPFONTADDFILE
5593 115. file:///tmp/html-l8lfPm#FCCONFIGAPPFONTADDDIR
5594 116. file:///tmp/html-l8lfPm#FCCONFIGAPPFONTCLEAR
5595 117. file:///tmp/html-l8lfPm#FCCONFIGSUBSTITUTEWITHPAT
5596 118. file:///tmp/html-l8lfPm#FCCONFIGSUBSTITUTE
5597 119. file:///tmp/html-l8lfPm#FCFONTMATCH
5598 120. file:///tmp/html-l8lfPm#FCFONTSORT
5599 121. file:///tmp/html-l8lfPm#FCFONTRENDERPREPARE
5600 122. file:///tmp/html-l8lfPm#FCFONTLIST
5601 123. file:///tmp/html-l8lfPm#FCCONFIGFILENAME
5602 124. file:///tmp/html-l8lfPm#FCCONFIGPARSEANDLOAD
5603 125. file:///tmp/html-l8lfPm#FCNAMEREGISTEROBJECTTYPES
5604 126. file:///tmp/html-l8lfPm#FCNAMEUNREGISTEROBJECTTYPES
5605 127. file:///tmp/html-l8lfPm#FCNAMEGETOBJECTTYPE
5606 128. file:///tmp/html-l8lfPm#FCNAMEREGISTERCONSTANTS
5607 129. file:///tmp/html-l8lfPm#FCNAMEUNREGISTERCONSTANTS
5608 130. file:///tmp/html-l8lfPm#FCNAMEGETCONSTANT
5609 131. file:///tmp/html-l8lfPm#FCNAMECONSTANT
5610 132. file:///tmp/html-l8lfPm#FCBLANKSCREATE
5611 133. file:///tmp/html-l8lfPm#FCBLANKSDESTROY
5612 134. file:///tmp/html-l8lfPm#FCBLANKSADD
5613 135. file:///tmp/html-l8lfPm#FCBLANKSISMEMBER
5614 136. file:///tmp/html-l8lfPm#FCATOMICCREATE
5615 137. file:///tmp/html-l8lfPm#FCATOMICLOCK
5616 138. file:///tmp/html-l8lfPm#FCATOMICNEWFILE
5617 139. file:///tmp/html-l8lfPm#FCATOMICORIGFILE
5618 140. file:///tmp/html-l8lfPm#FCATOMICREPLACEORIG
5619 141. file:///tmp/html-l8lfPm#FCATOMICDELETENEW
5620 142. file:///tmp/html-l8lfPm#FCATOMICUNLOCK
5621 143. file:///tmp/html-l8lfPm#FCATOMICDESTROY
5622 144. file:///tmp/html-l8lfPm#FCFILESCAN
5623 145. file:///tmp/html-l8lfPm#FCFILEISDIR
5624 146. file:///tmp/html-l8lfPm#FCDIRSCAN
5625 147. file:///tmp/html-l8lfPm#FCDIRSAVE
5626 148. file:///tmp/html-l8lfPm#FCDIRCACHEUNLINK
5627 149. file:///tmp/html-l8lfPm#FCDIRCACHEVALID
5628 150. file:///tmp/html-l8lfPm#FCDIRCACHELOAD
5629 151. file:///tmp/html-l8lfPm#FCDIRCACHEREAD
5630 152. file:///tmp/html-l8lfPm#FCDIRCACHELOADFILE
5631 153. file:///tmp/html-l8lfPm#FCDIRCACHEUNLOAD
5632 154. file:///tmp/html-l8lfPm#FCCACHEDIR
5633 155. file:///tmp/html-l8lfPm#FCCACHECOPYSET
5634 156. file:///tmp/html-l8lfPm#FCCACHESUBDIR
5635 157. file:///tmp/html-l8lfPm#FCCACHENUMSUBDIR
5636 158. file:///tmp/html-l8lfPm#FCCACHENUMFONT
5637 159. file:///tmp/html-l8lfPm#FCDIRCACHECLEAN
5638 160. file:///tmp/html-l8lfPm#FCCACHECREATETAGFILE
5639 161. file:///tmp/html-l8lfPm#FCSTRSETCREATE
5640 162. file:///tmp/html-l8lfPm#FCSTRSETMEMBER
5641 163. file:///tmp/html-l8lfPm#FCSTRSETEQUAL
5642 164. file:///tmp/html-l8lfPm#FCSTRSETADD
5643 165. file:///tmp/html-l8lfPm#FCSTRSETADDFILENAME
5644 166. file:///tmp/html-l8lfPm#FCSTRSETDEL
5645 167. file:///tmp/html-l8lfPm#FCSTRSETDESTROY
5646 168. file:///tmp/html-l8lfPm#FCSTRLISTCREATE
5647 169. file:///tmp/html-l8lfPm#FCSTRLISTNEXT
5648 170. file:///tmp/html-l8lfPm#FCSTRLISTDONE
5649 171. file:///tmp/html-l8lfPm#FCUTF8TOUCS4
5650 172. file:///tmp/html-l8lfPm#FCUCS4TOUTF8
5651 173. file:///tmp/html-l8lfPm#FCUTF8LEN
5652 174. file:///tmp/html-l8lfPm#FCUTF16TOUCS4
5653 175. file:///tmp/html-l8lfPm#FCUTF16LEN
5654 176. file:///tmp/html-l8lfPm#FCISLOWER
5655 177. file:///tmp/html-l8lfPm#FCISUPPER
5656 178. file:///tmp/html-l8lfPm#FCTOLOWER
5657 179. file:///tmp/html-l8lfPm#FCSTRCOPY
5658 180. file:///tmp/html-l8lfPm#FCSTRDOWNCASE
5659 181. file:///tmp/html-l8lfPm#FCSTRCOPYFILENAME
5660 182. file:///tmp/html-l8lfPm#FCSTRCMP
5661 183. file:///tmp/html-l8lfPm#FCSTRCMPIGNORECASE
5662 184. file:///tmp/html-l8lfPm#FCSTRSTR
5663 185. file:///tmp/html-l8lfPm#FCSTRSTRIGNORECASE
5664 186. file:///tmp/html-l8lfPm#FCSTRPLUS
5665 187. file:///tmp/html-l8lfPm#FCSTRFREE
5666 188. file:///tmp/html-l8lfPm#FCSTRDIRNAME
5667 189. file:///tmp/html-l8lfPm#FCSTRBASENAME