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.
42 #include <sys/types.h>
45 #include <fontconfig/fontconfig.h>
46 #include <fontconfig/fcprivate.h>
47 #include "fcdeprecate.h"
51 #ifndef FC_CONFIG_PATH
52 #define FC_CONFIG_PATH "fonts.conf"
57 # define _WIN32_WINNT 0x0500
59 # define WIN32_LEAN_AND_MEAN
62 typedef UINT (WINAPI *pfnGetSystemWindowsDirectory)(LPSTR, UINT);
63 typedef HRESULT (WINAPI *pfnSHGetFolderPathA)(HWND, int, HANDLE, DWORD, LPSTR);
64 extern pfnGetSystemWindowsDirectory pGetSystemWindowsDirectory;
65 extern pfnSHGetFolderPathA pSHGetFolderPathA;
66 # define FC_SEARCH_PATH_SEPARATOR ';'
67 # define FC_DIR_SEPARATOR '\\'
68 # define FC_DIR_SEPARATOR_S "\\"
70 # define FC_SEARCH_PATH_SEPARATOR ':'
71 # define FC_DIR_SEPARATOR '/'
72 # define FC_DIR_SEPARATOR_S "/"
76 #define FC_UNUSED __attribute__((unused))
81 #define FC_DBG_MATCH 1
82 #define FC_DBG_MATCHV 2
84 #define FC_DBG_FONTSET 8
85 #define FC_DBG_CACHE 16
86 #define FC_DBG_CACHEV 32
87 #define FC_DBG_PARSE 64
88 #define FC_DBG_SCAN 128
89 #define FC_DBG_SCANV 256
90 #define FC_DBG_CONFIG 1024
91 #define FC_DBG_LANGSET 2048
93 #define _FC_ASSERT_STATIC1(_line, _cond) typedef int _static_assert_on_line_##_line##_failed[(_cond)?1:-1]
94 #define _FC_ASSERT_STATIC0(_line, _cond) _FC_ASSERT_STATIC1 (_line, (_cond))
95 #define FC_ASSERT_STATIC(_cond) _FC_ASSERT_STATIC0 (__LINE__, (_cond))
97 #define FC_MIN(a,b) ((a) < (b) ? (a) : (b))
98 #define FC_MAX(a,b) ((a) > (b) ? (a) : (b))
99 #define FC_ABS(a) ((a) < 0 ? -(a) : (a))
101 /* slim_internal.h */
102 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun)
103 #define FcPrivate __attribute__((__visibility__("hidden")))
104 #define HAVE_GNUC_ATTRIBUTE 1
106 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
107 #define FcPrivate __hidden
108 #else /* not gcc >= 3.3 and not Sun Studio >= 8 */
112 FC_ASSERT_STATIC (sizeof (FcRef) == sizeof (int));
114 typedef enum _FcValueBinding {
115 FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame
119 * Serialized data structures use only offsets instead of pointers
120 * A low bit of 1 indicates an offset.
123 /* Is the provided pointer actually an offset? */
124 #define FcIsEncodedOffset(p) ((((intptr_t) (p)) & 1) != 0)
126 /* Encode offset in a pointer of type t */
127 #define FcOffsetEncode(o,t) ((t *) ((o) | 1))
129 /* Decode a pointer into an offset */
130 #define FcOffsetDecode(p) (((intptr_t) (p)) & ~1)
132 /* Compute pointer offset */
133 #define FcPtrToOffset(b,p) ((intptr_t) (p) - (intptr_t) (b))
135 /* Given base address, offset and type, return a pointer */
136 #define FcOffsetToPtr(b,o,t) ((t *) ((intptr_t) (b) + (o)))
138 /* Given base address, encoded offset and type, return a pointer */
139 #define FcEncodedOffsetToPtr(b,p,t) FcOffsetToPtr(b,FcOffsetDecode(p),t)
141 /* Given base address, pointer and type, return an encoded offset */
142 #define FcPtrToEncodedOffset(b,p,t) FcOffsetEncode(FcPtrToOffset(b,p),t)
144 /* Given a structure, offset member and type, return pointer */
145 #define FcOffsetMember(s,m,t) FcOffsetToPtr(s,(s)->m,t)
147 /* Given a structure, encoded offset member and type, return pointer to member */
148 #define FcEncodedOffsetMember(s,m,t) FcOffsetToPtr(s,FcOffsetDecode((s)->m), t)
150 /* Given a structure, member and type, convert the member to a pointer */
151 #define FcPointerMember(s,m,t) (FcIsEncodedOffset((s)->m) ? \
152 FcEncodedOffsetMember (s,m,t) : \
156 * Serialized values may hold strings, charsets and langsets as pointers,
157 * unfortunately FcValue is an exposed type so we can't just always use
160 #define FcValueString(v) FcPointerMember(v,u.s,FcChar8)
161 #define FcValueCharSet(v) FcPointerMember(v,u.c,const FcCharSet)
162 #define FcValueLangSet(v) FcPointerMember(v,u.l,const FcLangSet)
164 typedef struct _FcValueList *FcValueListPtr;
166 typedef struct _FcValueList {
167 struct _FcValueList *next;
169 FcValueBinding binding;
172 #define FcValueListNext(vl) FcPointerMember(vl,next,FcValueList)
174 typedef int FcObject;
176 typedef struct _FcPatternElt *FcPatternEltPtr;
179 * Pattern elts are stuck in a structure connected to the pattern,
180 * so they get moved around when the pattern is resized. Hence, the
181 * values field must be a pointer/offset instead of just an offset
183 typedef struct _FcPatternElt {
188 #define FcPatternEltValues(pe) FcPointerMember(pe,values,FcValueList)
193 intptr_t elts_offset;
197 #define FcPatternElts(p) FcOffsetMember(p,elts_offset,FcPatternElt)
199 #define FcFontSetFonts(fs) FcPointerMember(fs,fonts,FcPattern *)
201 #define FcFontSetFont(fs,i) (FcIsEncodedOffset((fs)->fonts) ? \
202 FcEncodedOffsetToPtr(fs, \
203 FcFontSetFonts(fs)[i], \
208 FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpRange, FcOpBool, FcOpCharSet, FcOpLangSet,
210 FcOpField, FcOpConst,
211 FcOpAssign, FcOpAssignReplace,
212 FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
214 FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
215 FcOpContains, FcOpListing, FcOpNotContains,
216 FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
217 FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
218 FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
222 typedef enum _FcOpFlags {
223 FcOpFlagIgnoreBlanks = 1 << 0
226 #define FC_OP_GET_OP(_x_) ((_x_) & 0xffff)
227 #define FC_OP_GET_FLAGS(_x_) (((_x_) & 0xffff0000) >> 16)
228 #define FC_OP(_x_,_f_) (FC_OP_GET_OP (_x_) | ((_f_) << 16))
230 typedef struct _FcExprMatrix {
231 struct _FcExpr *xx, *xy, *yx, *yy;
234 typedef struct _FcExprName {
240 typedef struct _FcExpr {
252 const FcChar8 *constant;
254 struct _FcExpr *left, *right;
259 typedef struct _FcExprPage FcExprPage;
262 FcExprPage *next_page;
264 FcExpr exprs[(1024 - 2/* two pointers */ - 2/* malloc overhead */) * sizeof (void *) / sizeof (FcExpr)];
265 FcExpr end[FLEXIBLE_ARRAY_MEMBER];
268 typedef enum _FcQual {
269 FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst
272 #define FcMatchDefault ((FcMatchKind) -1)
274 typedef struct _FcTest {
275 struct _FcTest *next;
283 typedef struct _FcEdit {
284 struct _FcEdit *next;
288 FcValueBinding binding;
291 typedef struct _FcSubst {
292 struct _FcSubst *next;
297 typedef struct _FcCharLeaf {
298 FcChar32 map[256/32];
302 FcRef ref; /* reference count */
303 int num; /* size of leaves and numbers arrays */
304 intptr_t leaves_offset;
305 intptr_t numbers_offset;
308 #define FcCharSetLeaves(c) FcOffsetMember(c,leaves_offset,intptr_t)
309 #define FcCharSetLeaf(c,i) (FcOffsetToPtr(FcCharSetLeaves(c), \
310 FcCharSetLeaves(c)[i], \
312 #define FcCharSetNumbers(c) FcOffsetMember(c,numbers_offset,FcChar16)
315 FcRef ref; /* reference count */
326 typedef struct _FcStrBuf {
332 FcChar8 buf_static[16 * sizeof (void *)];
336 unsigned int magic; /* FC_CACHE_MAGIC_MMAP or FC_CACHE_ALLOC */
337 int version; /* FC_CACHE_CONTENT_VERSION */
338 intptr_t size; /* size of file */
339 intptr_t dir; /* offset to dir name */
340 intptr_t dirs; /* offset to subdirs */
341 int dirs_count; /* number of subdir strings */
342 intptr_t set; /* offset to font set */
343 int checksum; /* checksum of directory state */
348 #define FcCacheDir(c) FcOffsetMember(c,dir,FcChar8)
349 #define FcCacheDirs(c) FcOffsetMember(c,dirs,intptr_t)
350 #define FcCacheSet(c) FcOffsetMember(c,set,FcFontSet)
351 #define FcCacheSubdir(c,i) FcOffsetToPtr (FcCacheDirs(c),\
356 * Used while constructing a directory cache object
359 #define FC_SERIALIZE_HASH_SIZE 8191
361 typedef union _FcAlign {
369 typedef struct _FcSerializeBucket {
370 struct _FcSerializeBucket *next;
375 typedef struct _FcCharSetFreezer FcCharSetFreezer;
377 typedef struct _FcSerialize {
379 FcCharSetFreezer *cs_freezer;
381 FcSerializeBucket *buckets[FC_SERIALIZE_HASH_SIZE];
385 * To map adobe glyph names to unicode values, a precomputed hash
389 typedef struct _FcGlyphName {
390 FcChar32 ucs; /* unicode value */
391 FcChar8 name[1]; /* name extends beyond struct */
395 * To perform case-insensitive string comparisons, a table
396 * is used which holds three different kinds of folding data.
398 * The first is a range of upper case values mapping to a range
399 * of their lower case equivalents. Within each range, the offset
400 * between upper and lower case is constant.
402 * The second is a range of upper case values which are interleaved
403 * with their lower case equivalents.
405 * The third is a set of raw unicode values mapping to a list
406 * of unicode values for comparison purposes. This allows conversion
407 * of ß to "ss" so that SS, ss and ß all match. A separate array
408 * holds the list of unicode values for each entry.
410 * These are packed into a single table. Using a binary search,
411 * the appropriate entry can be located.
414 #define FC_CASE_FOLD_RANGE 0
415 #define FC_CASE_FOLD_EVEN_ODD 1
416 #define FC_CASE_FOLD_FULL 2
418 typedef struct _FcCaseFold {
422 short offset; /* lower - upper for RANGE, table id for FULL */
425 #define FC_MAX_FILE_LEN 4096
427 #define FC_CACHE_MAGIC_MMAP 0xFC02FC04
428 #define FC_CACHE_MAGIC_ALLOC 0xFC02FC05
429 #define FC_CACHE_CONTENT_VERSION 3
432 FcChar8 *file; /* original file name */
433 FcChar8 *new; /* temp file name -- write data here */
434 FcChar8 *lck; /* lockfile name (used for locking) */
435 FcChar8 *tmp; /* tmpfile name (used for locking) */
446 * File names loaded from the configuration -- saved here as the
447 * cache file must be consulted before the directories are scanned,
448 * and those directives may occur in any order
450 FcStrSet *configDirs; /* directories to scan for fonts */
452 * Set of allowed blank chars -- used to
453 * trim fonts of bogus glyphs
457 * List of directories containing fonts,
458 * built by recursively scanning the set
459 * of configured directories
463 * List of directories containing cache files.
467 * Names of all of the configuration files used
468 * to create this configuration
470 FcStrSet *configFiles; /* config files loaded */
472 * Substitution instructions for patterns and fonts;
473 * maxObjects is used to allocate appropriate intermediate storage
474 * while performing a whole set of substitutions
476 FcSubst *substPattern; /* substitutions for patterns */
477 FcSubst *substFont; /* substitutions for fonts */
478 FcSubst *substScan; /* substitutions for scanned fonts */
479 int maxObjects; /* maximum number of tests in all substs */
481 * List of patterns used to control font file selection
483 FcStrSet *acceptGlobs;
484 FcStrSet *rejectGlobs;
485 FcFontSet *acceptPatterns;
486 FcFontSet *rejectPatterns;
488 * The set of fonts loaded from the listed directories; the
489 * order within the set does not determine the font selection,
490 * except in the case of identical matches in which case earlier fonts
491 * match preferrentially
493 FcFontSet *fonts[FcSetApplication + 1];
495 * Fontconfig can periodically rescan the system configuration
496 * and font directories. This rescanning occurs when font
497 * listing requests are made, but no more often than rescanInterval
500 time_t rescanTime; /* last time information was scanned */
501 int rescanInterval; /* interval between scans */
503 FcRef ref; /* reference count */
505 FcExprPage *expr_pool; /* pool of FcExpr's */
508 extern FcPrivate FcConfig *_fcConfig;
510 typedef struct _FcFileTime {
515 typedef struct _FcCharMap FcCharMap;
517 typedef struct _FcRange FcRange;
524 typedef struct _FcStatFS FcStatFS;
528 FcBool is_mtime_broken;
531 typedef struct _FcValuePromotionBuffer FcValuePromotionBuffer;
533 struct _FcValuePromotionBuffer {
538 char c[256]; /* Enlarge as needed */
547 FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
550 FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
553 FcDirCacheWrite (FcCache *cache, FcConfig *config);
556 FcDirCacheCreateTagFile (const FcChar8 *cache_dir);
559 FcCacheObjectReference (void *object);
562 FcCacheObjectDereference (void *object);
568 FcDirCacheReference (FcCache *cache, int nref);
573 FcConfigXdgCacheHome (void);
576 FcConfigXdgConfigHome (void);
579 FcConfigXdgDataHome (void);
582 FcConfigAllocExpr (FcConfig *config);
585 FcConfigAddConfigDir (FcConfig *config,
589 FcConfigAddFontDir (FcConfig *config,
593 FcConfigAddDir (FcConfig *config,
597 FcConfigAddCacheDir (FcConfig *config,
601 FcConfigAddConfigFile (FcConfig *config,
605 FcConfigAddBlank (FcConfig *config,
609 FcConfigAddEdit (FcConfig *config,
615 FcConfigSetFonts (FcConfig *config,
620 FcConfigCompareValue (const FcValue *m,
625 FcConfigGlobAdd (FcConfig *config,
630 FcConfigAcceptFilename (FcConfig *config,
631 const FcChar8 *filename);
634 FcConfigPatternsAdd (FcConfig *config,
639 FcConfigAcceptFont (FcConfig *config,
640 const FcPattern *font);
643 FcConfigModifiedTime (FcConfig *config);
646 FcConfigAddCache (FcConfig *config, FcCache *cache,
647 FcSetName set, FcStrSet *dirSet);
651 FcAlignSize (intptr_t size);
653 FcPrivate FcSerialize *
654 FcSerializeCreate (void);
657 FcSerializeDestroy (FcSerialize *serialize);
660 FcSerializeAlloc (FcSerialize *serialize, const void *object, int size);
663 FcSerializeReserve (FcSerialize *serialize, int size);
666 FcSerializeOffset (FcSerialize *serialize, const void *object);
669 FcSerializePtr (FcSerialize *serialize, const void *object);
672 FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l);
674 FcPrivate FcLangSet *
675 FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l);
679 FcLangCharSetPopulate (void);
681 FcPrivate FcCharSetFreezer *
682 FcCharSetFreezerCreate (void);
684 FcPrivate const FcCharSet *
685 FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs);
688 FcCharSetFreezerDestroy (FcCharSetFreezer *freezer);
691 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
693 FcPrivate FcCharSet *
694 FcNameParseCharSet (FcChar8 *string);
697 FcNameUnparseValue (FcStrBuf *buf,
702 FcNameUnparseValueList (FcStrBuf *buf,
706 FcPrivate FcCharLeaf *
707 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
710 FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs);
712 FcPrivate FcCharSet *
713 FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
716 FcCharSetGetNumbers(const FcCharSet *c);
721 FcValuePrintFile (FILE *f, const FcValue v);
724 FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark);
727 FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos);
730 FcValueListPrint (FcValueListPtr l);
733 FcLangSetPrint (const FcLangSet *ls);
739 FcTestPrint (const FcTest *test);
742 FcExprPrint (const FcExpr *expr);
745 FcEditPrint (const FcEdit *edit);
748 FcSubstPrint (const FcSubst *subst);
751 FcCharSetPrint (const FcCharSet *c);
753 extern FcPrivate int FcDebugVal;
755 #define FcDebug() (FcDebugVal)
762 FcGetDefaultLang (void);
765 FcDefaultFini (void);
770 FcFileIsLink (const FcChar8 *file);
773 FcFileScanConfig (FcFontSet *set,
780 FcDirScanConfig (FcFontSet *set,
794 FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
796 FcPrivate FcFontSet *
797 FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
801 FcTestDestroy (FcTest *test);
804 FcEditDestroy (FcEdit *e);
807 FcPrivate FcLangSet *
808 FcFreeTypeLangSet (const FcCharSet *charset,
809 const FcChar8 *exclusiveLang);
812 FcLangNormalize (const FcChar8 *lang);
814 FcPrivate FcLangResult
815 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
817 FcPrivate FcLangSet *
818 FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *buf);
820 FcPrivate FcLangSet *
821 FcNameParseLangSet (const FcChar8 *string);
824 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
827 FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
832 FcListPatternMatchAny (const FcPattern *p,
833 const FcPattern *font);
840 FC_INVALID_OBJECT = 0,
841 #define FC_OBJECT(NAME, Type) FC_##NAME##_OBJECT,
844 FC_ONE_AFTER_MAX_BASE_OBJECT
845 #define FC_MAX_BASE_OBJECT (FC_ONE_AFTER_MAX_BASE_OBJECT - 1)
849 FcNameBool (const FcChar8 *v, FcBool *result);
852 FcObjectValidType (FcObject object, FcType type);
855 FcObjectFromName (const char * name);
857 FcPrivate const char *
858 FcObjectName (FcObject object);
860 FcPrivate FcObjectSet *
861 FcObjectGetSet (void);
863 #define FcObjectCompare(a, b) ((int) a - (int) b)
868 FcValueCanonicalize (const FcValue *v);
870 FcPrivate FcValueListPtr
871 FcValueListCreate (void);
874 FcValueListDestroy (FcValueListPtr l);
876 FcPrivate FcValueListPtr
877 FcValueListPrepend (FcValueListPtr vallist,
879 FcValueBinding binding);
881 FcPrivate FcValueListPtr
882 FcValueListAppend (FcValueListPtr vallist,
884 FcValueBinding binding);
886 FcPrivate FcValueListPtr
887 FcValueListDuplicate(FcValueListPtr orig);
889 FcPrivate FcPatternElt *
890 FcPatternObjectFindElt (const FcPattern *p, FcObject object);
892 FcPrivate FcPatternElt *
893 FcPatternObjectInsertElt (FcPattern *p, FcObject object);
896 FcPatternObjectListAdd (FcPattern *p,
902 FcPatternObjectAddWithBinding (FcPattern *p,
905 FcValueBinding binding,
909 FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
912 FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
915 FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
918 FcPatternObjectDel (FcPattern *p, FcObject object);
921 FcPatternObjectRemove (FcPattern *p, FcObject object, int id);
924 FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i);
927 FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d);
930 FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s);
933 FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s);
936 FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c);
939 FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
942 FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
945 FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
948 FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d);
951 FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s);
954 FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s);
957 FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c);
960 FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
963 FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
966 FcPatternAppend (FcPattern *p, FcPattern *s);
968 FcPrivate const FcChar8 *
969 FcSharedStr (const FcChar8 *name);
972 FcSharedStrFree (FcChar8 *name);
975 FcStringHash (const FcChar8 *s);
978 FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat);
980 FcPrivate FcPattern *
981 FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat);
984 FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat);
986 FcPrivate FcValueList *
987 FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat);
993 extern FcPrivate const FcMatrix FcIdentityMatrix;
996 FcMatrixFree (FcMatrix *mat);
1001 FcStat (const FcChar8 *file, struct stat *statb);
1004 FcStatChecksum (const FcChar8 *file, struct stat *statb);
1007 FcIsFsMmapSafe (int fd);
1010 FcIsFsMtimeBroken (const FcChar8 *dir);
1014 FcStrSetAddLangs (FcStrSet *strs, const char *languages);
1017 FcStrSetSort (FcStrSet * set);
1020 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
1023 FcStrBufDestroy (FcStrBuf *buf);
1026 FcStrBufDone (FcStrBuf *buf);
1029 FcStrBufDoneStatic (FcStrBuf *buf);
1032 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
1035 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
1038 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
1041 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1044 FcStrRegexCmp (const FcChar8 *s, const FcChar8 *regex);
1047 FcStrRegexCmpIgnoreCase (const FcChar8 *s, const FcChar8 *regex);
1049 FcPrivate const FcChar8 *
1050 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1052 FcPrivate const FcChar8 *
1053 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
1055 FcPrivate const FcChar8 *
1056 FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2);
1059 FcStrUsesHome (const FcChar8 *s);
1062 FcStrLastSlash (const FcChar8 *path);
1065 FcStrHashIgnoreCase (const FcChar8 *s);
1068 FcStrCanonFilename (const FcChar8 *s);
1071 FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
1074 FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
1079 FcObjectLookupIdByName (const char *str);
1082 FcObjectLookupBuiltinIdByName (const char *str);
1084 FcPrivate const char *
1085 FcObjectLookupOtherNameById (FcObject id);
1087 FcPrivate const FcObjectType *
1088 FcObjectLookupOtherTypeById (FcObject id);
1090 FcPrivate const FcObjectType *
1091 FcObjectLookupOtherTypeByName (const char *str);
1093 #endif /* _FC_INT_H_ */