2 * fontconfig/src/fcint.h
4 * Copyright © 2000 Keith Packard
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of the author(s) not be used in
11 * advertising or publicity pertaining to distribution of the software without
12 * specific, written prior permission. The authors make no
13 * representations about the suitability of this software for any purpose. It
14 * is provided "as is" without express or implied warranty.
16 * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 * PERFORMANCE OF THIS SOFTWARE.
43 #include <sys/types.h>
46 #include <fontconfig/fontconfig.h>
47 #include <fontconfig/fcprivate.h>
48 #include "fcdeprecate.h"
52 #ifndef FC_CONFIG_PATH
53 #define FC_CONFIG_PATH "fonts.conf"
57 # include "fcwindows.h"
58 typedef UINT (WINAPI *pfnGetSystemWindowsDirectory)(LPSTR, UINT);
59 typedef HRESULT (WINAPI *pfnSHGetFolderPathA)(HWND, int, HANDLE, DWORD, LPSTR);
60 extern pfnGetSystemWindowsDirectory pGetSystemWindowsDirectory;
61 extern pfnSHGetFolderPathA pSHGetFolderPathA;
62 # define FC_SEARCH_PATH_SEPARATOR ';'
63 # define FC_DIR_SEPARATOR '\\'
64 # define FC_DIR_SEPARATOR_S "\\"
66 # define FC_SEARCH_PATH_SEPARATOR ':'
67 # define FC_DIR_SEPARATOR '/'
68 # define FC_DIR_SEPARATOR_S "/"
72 #define FC_UNUSED __attribute__((unused))
77 #define FC_DBG_MATCH 1
78 #define FC_DBG_MATCHV 2
80 #define FC_DBG_FONTSET 8
81 #define FC_DBG_CACHE 16
82 #define FC_DBG_CACHEV 32
83 #define FC_DBG_PARSE 64
84 #define FC_DBG_SCAN 128
85 #define FC_DBG_SCANV 256
86 #define FC_DBG_CONFIG 1024
87 #define FC_DBG_LANGSET 2048
89 #define _FC_ASSERT_STATIC1(_line, _cond) typedef int _static_assert_on_line_##_line##_failed[(_cond)?1:-1] FC_UNUSED
90 #define _FC_ASSERT_STATIC0(_line, _cond) _FC_ASSERT_STATIC1 (_line, (_cond))
91 #define FC_ASSERT_STATIC(_cond) _FC_ASSERT_STATIC0 (__LINE__, (_cond))
93 #define FC_MIN(a,b) ((a) < (b) ? (a) : (b))
94 #define FC_MAX(a,b) ((a) > (b) ? (a) : (b))
95 #define FC_ABS(a) ((a) < 0 ? -(a) : (a))
98 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun)
99 #define FcPrivate __attribute__((__visibility__("hidden")))
100 #define HAVE_GNUC_ATTRIBUTE 1
102 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
103 #define FcPrivate __hidden
104 #else /* not gcc >= 3.3 and not Sun Studio >= 8 */
108 FC_ASSERT_STATIC (sizeof (FcRef) == sizeof (int));
110 typedef enum _FcValueBinding {
111 FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame,
112 /* to make sure sizeof (FcValueBinding) == 4 even with -fshort-enums */
113 FcValueBindingEnd = INT_MAX
116 #define FcStrdup(s) ((FcChar8 *) strdup ((const char *) (s)))
117 #define FcFree(s) (free ((FcChar8 *) (s)))
120 * Serialized data structures use only offsets instead of pointers
121 * A low bit of 1 indicates an offset.
124 /* Is the provided pointer actually an offset? */
125 #define FcIsEncodedOffset(p) ((((intptr_t) (p)) & 1) != 0)
127 /* Encode offset in a pointer of type t */
128 #define FcOffsetEncode(o,t) ((t *) ((o) | 1))
130 /* Decode a pointer into an offset */
131 #define FcOffsetDecode(p) (((intptr_t) (p)) & ~1)
133 /* Compute pointer offset */
134 #define FcPtrToOffset(b,p) ((intptr_t) (p) - (intptr_t) (b))
136 /* Given base address, offset and type, return a pointer */
137 #define FcOffsetToPtr(b,o,t) ((t *) ((intptr_t) (b) + (o)))
139 /* Given base address, encoded offset and type, return a pointer */
140 #define FcEncodedOffsetToPtr(b,p,t) FcOffsetToPtr(b,FcOffsetDecode(p),t)
142 /* Given base address, pointer and type, return an encoded offset */
143 #define FcPtrToEncodedOffset(b,p,t) FcOffsetEncode(FcPtrToOffset(b,p),t)
145 /* Given a structure, offset member and type, return pointer */
146 #define FcOffsetMember(s,m,t) FcOffsetToPtr(s,(s)->m,t)
148 /* Given a structure, encoded offset member and type, return pointer to member */
149 #define FcEncodedOffsetMember(s,m,t) FcOffsetToPtr(s,FcOffsetDecode((s)->m), t)
151 /* Given a structure, member and type, convert the member to a pointer */
152 #define FcPointerMember(s,m,t) (FcIsEncodedOffset((s)->m) ? \
153 FcEncodedOffsetMember (s,m,t) : \
157 * Serialized values may hold strings, charsets and langsets as pointers,
158 * unfortunately FcValue is an exposed type so we can't just always use
161 #define FcValueString(v) FcPointerMember(v,u.s,FcChar8)
162 #define FcValueCharSet(v) FcPointerMember(v,u.c,const FcCharSet)
163 #define FcValueLangSet(v) FcPointerMember(v,u.l,const FcLangSet)
165 typedef struct _FcValueList *FcValueListPtr;
167 typedef struct _FcValueList {
168 struct _FcValueList *next;
170 FcValueBinding binding;
173 #define FcValueListNext(vl) FcPointerMember(vl,next,FcValueList)
175 typedef int FcObject;
177 /* The 1024 is to leave some room for future added internal objects, such
178 * that caches from newer fontconfig can still be used with older fontconfig
179 * without getting confused. */
180 #define FC_EXT_OBJ_INDEX 1024
181 #define FC_OBJ_ID(_n_) ((_n_) & (~FC_EXT_OBJ_INDEX))
183 typedef struct _FcPatternElt *FcPatternEltPtr;
186 * Pattern elts are stuck in a structure connected to the pattern,
187 * so they get moved around when the pattern is resized. Hence, the
188 * values field must be a pointer/offset instead of just an offset
190 typedef struct _FcPatternElt {
195 #define FcPatternEltValues(pe) FcPointerMember(pe,values,FcValueList)
200 intptr_t elts_offset;
204 #define FcPatternElts(p) FcOffsetMember(p,elts_offset,FcPatternElt)
206 #define FcFontSetFonts(fs) FcPointerMember(fs,fonts,FcPattern *)
208 #define FcFontSetFont(fs,i) (FcIsEncodedOffset((fs)->fonts) ? \
209 FcEncodedOffsetToPtr(fs, \
210 FcFontSetFonts(fs)[i], \
215 FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpRange, FcOpBool, FcOpCharSet, FcOpLangSet,
217 FcOpField, FcOpConst,
218 FcOpAssign, FcOpAssignReplace,
219 FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
220 FcOpDelete, FcOpDeleteAll,
222 FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
223 FcOpContains, FcOpListing, FcOpNotContains,
224 FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
225 FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
226 FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
230 typedef enum _FcOpFlags {
231 FcOpFlagIgnoreBlanks = 1 << 0
234 #define FC_OP_GET_OP(_x_) ((_x_) & 0xffff)
235 #define FC_OP_GET_FLAGS(_x_) (((_x_) & 0xffff0000) >> 16)
236 #define FC_OP(_x_,_f_) (FC_OP_GET_OP (_x_) | ((_f_) << 16))
238 typedef struct _FcExprMatrix {
239 struct _FcExpr *xx, *xy, *yx, *yy;
242 typedef struct _FcExprName {
248 typedef struct _FcExpr {
260 const FcChar8 *constant;
262 struct _FcExpr *left, *right;
267 typedef struct _FcExprPage FcExprPage;
270 FcExprPage *next_page;
272 FcExpr exprs[(1024 - 2/* two pointers */ - 2/* malloc overhead */) * sizeof (void *) / sizeof (FcExpr)];
273 FcExpr end[FLEXIBLE_ARRAY_MEMBER];
276 typedef enum _FcQual {
277 FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst
280 #define FcMatchDefault ((FcMatchKind) -1)
282 typedef struct _FcTest {
290 typedef struct _FcEdit {
294 FcValueBinding binding;
297 typedef enum _FcRuleType {
298 FcRuleUnknown, FcRuleTest, FcRuleEdit
301 typedef struct _FcRule {
302 struct _FcRule *next;
310 typedef struct _FcSubst {
311 struct _FcSubst *next;
315 typedef struct _FcCharLeaf {
316 FcChar32 map[256/32];
320 FcRef ref; /* reference count */
321 int num; /* size of leaves and numbers arrays */
322 intptr_t leaves_offset;
323 intptr_t numbers_offset;
326 #define FcCharSetLeaves(c) FcOffsetMember(c,leaves_offset,intptr_t)
327 #define FcCharSetLeaf(c,i) (FcOffsetToPtr(FcCharSetLeaves(c), \
328 FcCharSetLeaves(c)[i], \
330 #define FcCharSetNumbers(c) FcOffsetMember(c,numbers_offset,FcChar16)
333 FcRef ref; /* reference count */
344 typedef struct _FcStrBuf {
350 FcChar8 buf_static[16 * sizeof (void *)];
354 unsigned int magic; /* FC_CACHE_MAGIC_MMAP or FC_CACHE_ALLOC */
355 int version; /* FC_CACHE_CONTENT_VERSION */
356 intptr_t size; /* size of file */
357 intptr_t dir; /* offset to dir name */
358 intptr_t dirs; /* offset to subdirs */
359 int dirs_count; /* number of subdir strings */
360 intptr_t set; /* offset to font set */
361 int checksum; /* checksum of directory state */
366 #define FcCacheDir(c) FcOffsetMember(c,dir,FcChar8)
367 #define FcCacheDirs(c) FcOffsetMember(c,dirs,intptr_t)
368 #define FcCacheSet(c) FcOffsetMember(c,set,FcFontSet)
369 #define FcCacheSubdir(c,i) FcOffsetToPtr (FcCacheDirs(c),\
374 * Used while constructing a directory cache object
377 #define FC_SERIALIZE_HASH_SIZE 8191
379 typedef union _FcAlign {
387 typedef struct _FcSerializeBucket {
388 struct _FcSerializeBucket *next;
393 typedef struct _FcCharSetFreezer FcCharSetFreezer;
395 typedef struct _FcSerialize {
397 FcCharSetFreezer *cs_freezer;
399 FcSerializeBucket *buckets[FC_SERIALIZE_HASH_SIZE];
403 * To map adobe glyph names to unicode values, a precomputed hash
407 typedef struct _FcGlyphName {
408 FcChar32 ucs; /* unicode value */
409 FcChar8 name[1]; /* name extends beyond struct */
413 * To perform case-insensitive string comparisons, a table
414 * is used which holds three different kinds of folding data.
416 * The first is a range of upper case values mapping to a range
417 * of their lower case equivalents. Within each range, the offset
418 * between upper and lower case is constant.
420 * The second is a range of upper case values which are interleaved
421 * with their lower case equivalents.
423 * The third is a set of raw unicode values mapping to a list
424 * of unicode values for comparison purposes. This allows conversion
425 * of ß to "ss" so that SS, ss and ß all match. A separate array
426 * holds the list of unicode values for each entry.
428 * These are packed into a single table. Using a binary search,
429 * the appropriate entry can be located.
432 #define FC_CASE_FOLD_RANGE 0
433 #define FC_CASE_FOLD_EVEN_ODD 1
434 #define FC_CASE_FOLD_FULL 2
436 typedef struct _FcCaseFold {
440 short offset; /* lower - upper for RANGE, table id for FULL */
443 #define FC_MAX_FILE_LEN 4096
445 #define FC_CACHE_MAGIC_MMAP 0xFC02FC04
446 #define FC_CACHE_MAGIC_ALLOC 0xFC02FC05
447 #define FC_CACHE_CONTENT_VERSION 4
450 FcChar8 *file; /* original file name */
451 FcChar8 *new; /* temp file name -- write data here */
452 FcChar8 *lck; /* lockfile name (used for locking) */
453 FcChar8 *tmp; /* tmpfile name (used for locking) */
464 * File names loaded from the configuration -- saved here as the
465 * cache file must be consulted before the directories are scanned,
466 * and those directives may occur in any order
468 FcStrSet *configDirs; /* directories to scan for fonts */
470 * Set of allowed blank chars -- used to
471 * trim fonts of bogus glyphs
475 * List of directories containing fonts,
476 * built by recursively scanning the set
477 * of configured directories
481 * List of directories containing cache files.
485 * Names of all of the configuration files used
486 * to create this configuration
488 FcStrSet *configFiles; /* config files loaded */
490 * Substitution instructions for patterns and fonts;
491 * maxObjects is used to allocate appropriate intermediate storage
492 * while performing a whole set of substitutions
494 FcSubst *substPattern; /* substitutions for patterns */
495 FcSubst *substFont; /* substitutions for fonts */
496 FcSubst *substScan; /* substitutions for scanned fonts */
497 int maxObjects; /* maximum number of tests in all substs */
499 * List of patterns used to control font file selection
501 FcStrSet *acceptGlobs;
502 FcStrSet *rejectGlobs;
503 FcFontSet *acceptPatterns;
504 FcFontSet *rejectPatterns;
506 * The set of fonts loaded from the listed directories; the
507 * order within the set does not determine the font selection,
508 * except in the case of identical matches in which case earlier fonts
509 * match preferrentially
511 FcFontSet *fonts[FcSetApplication + 1];
513 * Fontconfig can periodically rescan the system configuration
514 * and font directories. This rescanning occurs when font
515 * listing requests are made, but no more often than rescanInterval
518 time_t rescanTime; /* last time information was scanned */
519 int rescanInterval; /* interval between scans */
521 FcRef ref; /* reference count */
523 FcExprPage *expr_pool; /* pool of FcExpr's */
525 FcChar8 *sysRoot; /* override the system root directory */
528 typedef struct _FcFileTime {
533 typedef struct _FcCharMap FcCharMap;
535 typedef struct _FcRange FcRange;
542 typedef struct _FcStatFS FcStatFS;
546 FcBool is_mtime_broken;
549 typedef struct _FcValuePromotionBuffer FcValuePromotionBuffer;
551 struct _FcValuePromotionBuffer {
556 char c[256]; /* Enlarge as needed */
565 FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
568 FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
571 FcDirCacheWrite (FcCache *cache, FcConfig *config);
574 FcDirCacheCreateTagFile (const FcChar8 *cache_dir);
577 FcCacheObjectReference (void *object);
580 FcCacheObjectDereference (void *object);
586 FcDirCacheReference (FcCache *cache, int nref);
597 FcConfigXdgCacheHome (void);
600 FcConfigXdgConfigHome (void);
603 FcConfigXdgDataHome (void);
606 FcConfigAllocExpr (FcConfig *config);
609 FcConfigAddConfigDir (FcConfig *config,
613 FcConfigAddFontDir (FcConfig *config,
617 FcConfigAddDir (FcConfig *config,
621 FcConfigAddCacheDir (FcConfig *config,
625 FcConfigAddConfigFile (FcConfig *config,
629 FcConfigAddBlank (FcConfig *config,
633 FcConfigAddRule (FcConfig *config,
638 FcConfigSetFonts (FcConfig *config,
643 FcConfigCompareValue (const FcValue *m,
648 FcConfigGlobAdd (FcConfig *config,
653 FcConfigAcceptFilename (FcConfig *config,
654 const FcChar8 *filename);
657 FcConfigPatternsAdd (FcConfig *config,
662 FcConfigAcceptFont (FcConfig *config,
663 const FcPattern *font);
666 FcConfigModifiedTime (FcConfig *config);
669 FcConfigAddCache (FcConfig *config, FcCache *cache,
670 FcSetName set, FcStrSet *dirSet);
674 FcAlignSize (intptr_t size);
676 FcPrivate FcSerialize *
677 FcSerializeCreate (void);
680 FcSerializeDestroy (FcSerialize *serialize);
683 FcSerializeAlloc (FcSerialize *serialize, const void *object, int size);
686 FcSerializeReserve (FcSerialize *serialize, int size);
689 FcSerializeOffset (FcSerialize *serialize, const void *object);
692 FcSerializePtr (FcSerialize *serialize, const void *object);
695 FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l);
697 FcPrivate FcLangSet *
698 FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l);
702 FcLangCharSetPopulate (void);
704 FcPrivate FcCharSetFreezer *
705 FcCharSetFreezerCreate (void);
707 FcPrivate const FcCharSet *
708 FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs);
711 FcCharSetFreezerDestroy (FcCharSetFreezer *freezer);
714 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
716 FcPrivate FcCharSet *
717 FcNameParseCharSet (FcChar8 *string);
720 FcNameUnparseValue (FcStrBuf *buf,
725 FcNameUnparseValueList (FcStrBuf *buf,
729 FcPrivate FcCharLeaf *
730 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
733 FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs);
735 FcPrivate FcCharSet *
736 FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
739 FcCharSetGetNumbers(const FcCharSet *c);
743 FcOpen(const char *pathname, int flags, ...);
746 FcMakeTempfile (char *template);
752 FcMakeDirectory (const FcChar8 *dir);
757 FcValuePrintFile (FILE *f, const FcValue v);
760 FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark);
763 FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos);
766 FcValueListPrint (FcValueListPtr l);
769 FcLangSetPrint (const FcLangSet *ls);
775 FcTestPrint (const FcTest *test);
778 FcExprPrint (const FcExpr *expr);
781 FcEditPrint (const FcEdit *edit);
784 FcSubstPrint (const FcSubst *subst);
787 FcCharSetPrint (const FcCharSet *c);
789 extern FcPrivate int FcDebugVal;
791 #define FcDebug() (FcDebugVal)
798 FcGetDefaultLang (void);
804 FcDefaultFini (void);
809 FcFileIsLink (const FcChar8 *file);
812 FcFileIsFile (const FcChar8 *file);
815 FcFileScanConfig (FcFontSet *set,
822 FcDirScanConfig (FcFontSet *set,
836 FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
838 FcPrivate FcFontSet *
839 FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
843 FcHashGetSHA256Digest (const FcChar8 *input_strings,
847 FcHashGetSHA256DigestFromFile (const FcChar8 *filename);
850 FcHashGetSHA256DigestFromMemory (const char *fontdata,
855 FcInitLoadOwnConfig (FcConfig *config);
858 FcInitLoadOwnConfigAndFonts (FcConfig *config);
862 FcTestDestroy (FcTest *test);
865 FcEditDestroy (FcEdit *e);
868 FcRuleDestroy (FcRule *rule);
871 FcPrivate FcLangSet *
872 FcFreeTypeLangSet (const FcCharSet *charset,
873 const FcChar8 *exclusiveLang);
875 FcPrivate FcLangResult
876 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
878 FcPrivate FcLangSet *
879 FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *buf);
881 FcPrivate FcLangSet *
882 FcNameParseLangSet (const FcChar8 *string);
885 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
888 FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
893 FcListPatternMatchAny (const FcPattern *p,
894 const FcPattern *font);
901 FC_INVALID_OBJECT = 0,
902 #define FC_OBJECT(NAME, Type, Cmp) FC_##NAME##_OBJECT,
905 FC_ONE_AFTER_MAX_BASE_OBJECT
906 #define FC_MAX_BASE_OBJECT (FC_ONE_AFTER_MAX_BASE_OBJECT - 1)
910 FcNameBool (const FcChar8 *v, FcBool *result);
913 FcObjectValidType (FcObject object, FcType type);
916 FcObjectFromName (const char * name);
918 FcPrivate const char *
919 FcObjectName (FcObject object);
921 FcPrivate FcObjectSet *
922 FcObjectGetSet (void);
924 #define FcObjectCompare(a, b) ((int) a - (int) b)
929 FcValueCanonicalize (const FcValue *v);
931 FcPrivate FcValueListPtr
932 FcValueListCreate (void);
935 FcValueListDestroy (FcValueListPtr l);
937 FcPrivate FcValueListPtr
938 FcValueListPrepend (FcValueListPtr vallist,
940 FcValueBinding binding);
942 FcPrivate FcValueListPtr
943 FcValueListAppend (FcValueListPtr vallist,
945 FcValueBinding binding);
947 FcPrivate FcValueListPtr
948 FcValueListDuplicate(FcValueListPtr orig);
950 FcPrivate FcPatternElt *
951 FcPatternObjectFindElt (const FcPattern *p, FcObject object);
953 FcPrivate FcPatternElt *
954 FcPatternObjectInsertElt (FcPattern *p, FcObject object);
957 FcPatternObjectListAdd (FcPattern *p,
963 FcPatternObjectAddWithBinding (FcPattern *p,
966 FcValueBinding binding,
970 FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
973 FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
976 FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
979 FcPatternObjectDel (FcPattern *p, FcObject object);
982 FcPatternObjectRemove (FcPattern *p, FcObject object, int id);
985 FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i);
988 FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d);
991 FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s);
994 FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s);
997 FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c);
1000 FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
1003 FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
1006 FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
1009 FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d);
1012 FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s);
1015 FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s);
1018 FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c);
1021 FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
1024 FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
1027 FcPatternAppend (FcPattern *p, FcPattern *s);
1030 FcStringHash (const FcChar8 *s);
1033 FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat);
1035 FcPrivate FcPattern *
1036 FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat);
1039 FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat);
1041 FcPrivate FcValueList *
1042 FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat);
1048 extern FcPrivate const FcMatrix FcIdentityMatrix;
1051 FcMatrixFree (FcMatrix *mat);
1056 FcStat (const FcChar8 *file, struct stat *statb);
1059 FcStatChecksum (const FcChar8 *file, struct stat *statb);
1062 FcIsFsMmapSafe (int fd);
1065 FcIsFsMtimeBroken (const FcChar8 *dir);
1069 FcStrSetAddLangs (FcStrSet *strs, const char *languages);
1072 FcStrSetSort (FcStrSet * set);
1075 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
1078 FcStrBufDestroy (FcStrBuf *buf);
1081 FcStrBufDone (FcStrBuf *buf);
1084 FcStrBufDoneStatic (FcStrBuf *buf);
1087 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
1090 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
1093 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
1096 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1099 FcStrCmpIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1102 FcStrRegexCmp (const FcChar8 *s, const FcChar8 *regex);
1105 FcStrRegexCmpIgnoreCase (const FcChar8 *s, const FcChar8 *regex);
1107 FcPrivate const FcChar8 *
1108 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1110 FcPrivate const FcChar8 *
1111 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
1113 FcPrivate const FcChar8 *
1114 FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2);
1117 FcStrMatchIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1120 FcStrGlobMatch (const FcChar8 *glob,
1121 const FcChar8 *string);
1124 FcStrUsesHome (const FcChar8 *s);
1127 FcStrBuildFilename (const FcChar8 *path,
1131 FcStrLastSlash (const FcChar8 *path);
1134 FcStrHashIgnoreCase (const FcChar8 *s);
1137 FcStrCanonFilename (const FcChar8 *s);
1140 FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
1143 FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
1148 FcObjectLookupIdByName (const char *str);
1151 FcObjectLookupBuiltinIdByName (const char *str);
1153 FcPrivate const char *
1154 FcObjectLookupOtherNameById (FcObject id);
1156 FcPrivate const FcObjectType *
1157 FcObjectLookupOtherTypeById (FcObject id);
1159 FcPrivate const FcObjectType *
1160 FcObjectLookupOtherTypeByName (const char *str);
1162 #endif /* _FC_INT_H_ */