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"
56 # include "fcwindows.h"
57 typedef UINT (WINAPI *pfnGetSystemWindowsDirectory)(LPSTR, UINT);
58 typedef HRESULT (WINAPI *pfnSHGetFolderPathA)(HWND, int, HANDLE, DWORD, LPSTR);
59 extern pfnGetSystemWindowsDirectory pGetSystemWindowsDirectory;
60 extern pfnSHGetFolderPathA pSHGetFolderPathA;
61 # define FC_SEARCH_PATH_SEPARATOR ';'
62 # define FC_DIR_SEPARATOR '\\'
63 # define FC_DIR_SEPARATOR_S "\\"
65 # define FC_SEARCH_PATH_SEPARATOR ':'
66 # define FC_DIR_SEPARATOR '/'
67 # define FC_DIR_SEPARATOR_S "/"
71 #define FC_UNUSED __attribute__((unused))
76 #define FC_DBG_MATCH 1
77 #define FC_DBG_MATCHV 2
79 #define FC_DBG_FONTSET 8
80 #define FC_DBG_CACHE 16
81 #define FC_DBG_CACHEV 32
82 #define FC_DBG_PARSE 64
83 #define FC_DBG_SCAN 128
84 #define FC_DBG_SCANV 256
85 #define FC_DBG_CONFIG 1024
86 #define FC_DBG_LANGSET 2048
88 #define _FC_ASSERT_STATIC1(_line, _cond) typedef int _static_assert_on_line_##_line##_failed[(_cond)?1:-1]
89 #define _FC_ASSERT_STATIC0(_line, _cond) _FC_ASSERT_STATIC1 (_line, (_cond))
90 #define FC_ASSERT_STATIC(_cond) _FC_ASSERT_STATIC0 (__LINE__, (_cond))
92 #define FC_MIN(a,b) ((a) < (b) ? (a) : (b))
93 #define FC_MAX(a,b) ((a) > (b) ? (a) : (b))
94 #define FC_ABS(a) ((a) < 0 ? -(a) : (a))
97 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun)
98 #define FcPrivate __attribute__((__visibility__("hidden")))
99 #define HAVE_GNUC_ATTRIBUTE 1
101 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
102 #define FcPrivate __hidden
103 #else /* not gcc >= 3.3 and not Sun Studio >= 8 */
107 FC_ASSERT_STATIC (sizeof (FcRef) == sizeof (int));
109 typedef enum _FcValueBinding {
110 FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame
113 #define FcStrdup(s) ((FcChar8 *) strdup ((const char *) (s)))
114 #define FcFree(s) (free ((FcChar8 *) (s)))
117 * Serialized data structures use only offsets instead of pointers
118 * A low bit of 1 indicates an offset.
121 /* Is the provided pointer actually an offset? */
122 #define FcIsEncodedOffset(p) ((((intptr_t) (p)) & 1) != 0)
124 /* Encode offset in a pointer of type t */
125 #define FcOffsetEncode(o,t) ((t *) ((o) | 1))
127 /* Decode a pointer into an offset */
128 #define FcOffsetDecode(p) (((intptr_t) (p)) & ~1)
130 /* Compute pointer offset */
131 #define FcPtrToOffset(b,p) ((intptr_t) (p) - (intptr_t) (b))
133 /* Given base address, offset and type, return a pointer */
134 #define FcOffsetToPtr(b,o,t) ((t *) ((intptr_t) (b) + (o)))
136 /* Given base address, encoded offset and type, return a pointer */
137 #define FcEncodedOffsetToPtr(b,p,t) FcOffsetToPtr(b,FcOffsetDecode(p),t)
139 /* Given base address, pointer and type, return an encoded offset */
140 #define FcPtrToEncodedOffset(b,p,t) FcOffsetEncode(FcPtrToOffset(b,p),t)
142 /* Given a structure, offset member and type, return pointer */
143 #define FcOffsetMember(s,m,t) FcOffsetToPtr(s,(s)->m,t)
145 /* Given a structure, encoded offset member and type, return pointer to member */
146 #define FcEncodedOffsetMember(s,m,t) FcOffsetToPtr(s,FcOffsetDecode((s)->m), t)
148 /* Given a structure, member and type, convert the member to a pointer */
149 #define FcPointerMember(s,m,t) (FcIsEncodedOffset((s)->m) ? \
150 FcEncodedOffsetMember (s,m,t) : \
154 * Serialized values may hold strings, charsets and langsets as pointers,
155 * unfortunately FcValue is an exposed type so we can't just always use
158 #define FcValueString(v) FcPointerMember(v,u.s,FcChar8)
159 #define FcValueCharSet(v) FcPointerMember(v,u.c,const FcCharSet)
160 #define FcValueLangSet(v) FcPointerMember(v,u.l,const FcLangSet)
162 typedef struct _FcValueList *FcValueListPtr;
164 typedef struct _FcValueList {
165 struct _FcValueList *next;
167 FcValueBinding binding;
170 #define FcValueListNext(vl) FcPointerMember(vl,next,FcValueList)
172 typedef int FcObject;
174 typedef struct _FcPatternElt *FcPatternEltPtr;
177 * Pattern elts are stuck in a structure connected to the pattern,
178 * so they get moved around when the pattern is resized. Hence, the
179 * values field must be a pointer/offset instead of just an offset
181 typedef struct _FcPatternElt {
186 #define FcPatternEltValues(pe) FcPointerMember(pe,values,FcValueList)
191 intptr_t elts_offset;
195 #define FcPatternElts(p) FcOffsetMember(p,elts_offset,FcPatternElt)
197 #define FcFontSetFonts(fs) FcPointerMember(fs,fonts,FcPattern *)
199 #define FcFontSetFont(fs,i) (FcIsEncodedOffset((fs)->fonts) ? \
200 FcEncodedOffsetToPtr(fs, \
201 FcFontSetFonts(fs)[i], \
206 FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpRange, FcOpBool, FcOpCharSet, FcOpLangSet,
208 FcOpField, FcOpConst,
209 FcOpAssign, FcOpAssignReplace,
210 FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
212 FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
213 FcOpContains, FcOpListing, FcOpNotContains,
214 FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
215 FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
216 FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
220 typedef enum _FcOpFlags {
221 FcOpFlagIgnoreBlanks = 1 << 0
224 #define FC_OP_GET_OP(_x_) ((_x_) & 0xffff)
225 #define FC_OP_GET_FLAGS(_x_) (((_x_) & 0xffff0000) >> 16)
226 #define FC_OP(_x_,_f_) (FC_OP_GET_OP (_x_) | ((_f_) << 16))
228 typedef struct _FcExprMatrix {
229 struct _FcExpr *xx, *xy, *yx, *yy;
232 typedef struct _FcExprName {
238 typedef struct _FcExpr {
250 const FcChar8 *constant;
252 struct _FcExpr *left, *right;
257 typedef struct _FcExprPage FcExprPage;
260 FcExprPage *next_page;
262 FcExpr exprs[(1024 - 2/* two pointers */ - 2/* malloc overhead */) * sizeof (void *) / sizeof (FcExpr)];
263 FcExpr end[FLEXIBLE_ARRAY_MEMBER];
266 typedef enum _FcQual {
267 FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst
270 #define FcMatchDefault ((FcMatchKind) -1)
272 typedef struct _FcTest {
273 struct _FcTest *next;
281 typedef struct _FcEdit {
282 struct _FcEdit *next;
286 FcValueBinding binding;
289 typedef struct _FcSubst {
290 struct _FcSubst *next;
295 typedef struct _FcCharLeaf {
296 FcChar32 map[256/32];
300 FcRef ref; /* reference count */
301 int num; /* size of leaves and numbers arrays */
302 intptr_t leaves_offset;
303 intptr_t numbers_offset;
306 #define FcCharSetLeaves(c) FcOffsetMember(c,leaves_offset,intptr_t)
307 #define FcCharSetLeaf(c,i) (FcOffsetToPtr(FcCharSetLeaves(c), \
308 FcCharSetLeaves(c)[i], \
310 #define FcCharSetNumbers(c) FcOffsetMember(c,numbers_offset,FcChar16)
313 FcRef ref; /* reference count */
324 typedef struct _FcStrBuf {
330 FcChar8 buf_static[16 * sizeof (void *)];
334 unsigned int magic; /* FC_CACHE_MAGIC_MMAP or FC_CACHE_ALLOC */
335 int version; /* FC_CACHE_CONTENT_VERSION */
336 intptr_t size; /* size of file */
337 intptr_t dir; /* offset to dir name */
338 intptr_t dirs; /* offset to subdirs */
339 int dirs_count; /* number of subdir strings */
340 intptr_t set; /* offset to font set */
341 int checksum; /* checksum of directory state */
346 #define FcCacheDir(c) FcOffsetMember(c,dir,FcChar8)
347 #define FcCacheDirs(c) FcOffsetMember(c,dirs,intptr_t)
348 #define FcCacheSet(c) FcOffsetMember(c,set,FcFontSet)
349 #define FcCacheSubdir(c,i) FcOffsetToPtr (FcCacheDirs(c),\
354 * Used while constructing a directory cache object
357 #define FC_SERIALIZE_HASH_SIZE 8191
359 typedef union _FcAlign {
367 typedef struct _FcSerializeBucket {
368 struct _FcSerializeBucket *next;
373 typedef struct _FcCharSetFreezer FcCharSetFreezer;
375 typedef struct _FcSerialize {
377 FcCharSetFreezer *cs_freezer;
379 FcSerializeBucket *buckets[FC_SERIALIZE_HASH_SIZE];
383 * To map adobe glyph names to unicode values, a precomputed hash
387 typedef struct _FcGlyphName {
388 FcChar32 ucs; /* unicode value */
389 FcChar8 name[1]; /* name extends beyond struct */
393 * To perform case-insensitive string comparisons, a table
394 * is used which holds three different kinds of folding data.
396 * The first is a range of upper case values mapping to a range
397 * of their lower case equivalents. Within each range, the offset
398 * between upper and lower case is constant.
400 * The second is a range of upper case values which are interleaved
401 * with their lower case equivalents.
403 * The third is a set of raw unicode values mapping to a list
404 * of unicode values for comparison purposes. This allows conversion
405 * of ß to "ss" so that SS, ss and ß all match. A separate array
406 * holds the list of unicode values for each entry.
408 * These are packed into a single table. Using a binary search,
409 * the appropriate entry can be located.
412 #define FC_CASE_FOLD_RANGE 0
413 #define FC_CASE_FOLD_EVEN_ODD 1
414 #define FC_CASE_FOLD_FULL 2
416 typedef struct _FcCaseFold {
420 short offset; /* lower - upper for RANGE, table id for FULL */
423 #define FC_MAX_FILE_LEN 4096
425 #define FC_CACHE_MAGIC_MMAP 0xFC02FC04
426 #define FC_CACHE_MAGIC_ALLOC 0xFC02FC05
427 #define FC_CACHE_CONTENT_VERSION 3
430 FcChar8 *file; /* original file name */
431 FcChar8 *new; /* temp file name -- write data here */
432 FcChar8 *lck; /* lockfile name (used for locking) */
433 FcChar8 *tmp; /* tmpfile name (used for locking) */
444 * File names loaded from the configuration -- saved here as the
445 * cache file must be consulted before the directories are scanned,
446 * and those directives may occur in any order
448 FcStrSet *configDirs; /* directories to scan for fonts */
450 * Set of allowed blank chars -- used to
451 * trim fonts of bogus glyphs
455 * List of directories containing fonts,
456 * built by recursively scanning the set
457 * of configured directories
461 * List of directories containing cache files.
465 * Names of all of the configuration files used
466 * to create this configuration
468 FcStrSet *configFiles; /* config files loaded */
470 * Substitution instructions for patterns and fonts;
471 * maxObjects is used to allocate appropriate intermediate storage
472 * while performing a whole set of substitutions
474 FcSubst *substPattern; /* substitutions for patterns */
475 FcSubst *substFont; /* substitutions for fonts */
476 FcSubst *substScan; /* substitutions for scanned fonts */
477 int maxObjects; /* maximum number of tests in all substs */
479 * List of patterns used to control font file selection
481 FcStrSet *acceptGlobs;
482 FcStrSet *rejectGlobs;
483 FcFontSet *acceptPatterns;
484 FcFontSet *rejectPatterns;
486 * The set of fonts loaded from the listed directories; the
487 * order within the set does not determine the font selection,
488 * except in the case of identical matches in which case earlier fonts
489 * match preferrentially
491 FcFontSet *fonts[FcSetApplication + 1];
493 * Fontconfig can periodically rescan the system configuration
494 * and font directories. This rescanning occurs when font
495 * listing requests are made, but no more often than rescanInterval
498 time_t rescanTime; /* last time information was scanned */
499 int rescanInterval; /* interval between scans */
501 FcRef ref; /* reference count */
503 FcExprPage *expr_pool; /* pool of FcExpr's */
506 typedef struct _FcFileTime {
511 typedef struct _FcCharMap FcCharMap;
513 typedef struct _FcRange FcRange;
520 typedef struct _FcStatFS FcStatFS;
524 FcBool is_mtime_broken;
527 typedef struct _FcValuePromotionBuffer FcValuePromotionBuffer;
529 struct _FcValuePromotionBuffer {
534 char c[256]; /* Enlarge as needed */
543 FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
546 FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
549 FcDirCacheWrite (FcCache *cache, FcConfig *config);
552 FcDirCacheCreateTagFile (const FcChar8 *cache_dir);
555 FcCacheObjectReference (void *object);
558 FcCacheObjectDereference (void *object);
564 FcDirCacheReference (FcCache *cache, int nref);
575 FcConfigXdgCacheHome (void);
578 FcConfigXdgConfigHome (void);
581 FcConfigXdgDataHome (void);
584 FcConfigAllocExpr (FcConfig *config);
587 FcConfigAddConfigDir (FcConfig *config,
591 FcConfigAddFontDir (FcConfig *config,
595 FcConfigAddDir (FcConfig *config,
599 FcConfigAddCacheDir (FcConfig *config,
603 FcConfigAddConfigFile (FcConfig *config,
607 FcConfigAddBlank (FcConfig *config,
611 FcConfigAddEdit (FcConfig *config,
617 FcConfigSetFonts (FcConfig *config,
622 FcConfigCompareValue (const FcValue *m,
627 FcConfigGlobAdd (FcConfig *config,
632 FcConfigAcceptFilename (FcConfig *config,
633 const FcChar8 *filename);
636 FcConfigPatternsAdd (FcConfig *config,
641 FcConfigAcceptFont (FcConfig *config,
642 const FcPattern *font);
645 FcConfigModifiedTime (FcConfig *config);
648 FcConfigAddCache (FcConfig *config, FcCache *cache,
649 FcSetName set, FcStrSet *dirSet);
653 FcAlignSize (intptr_t size);
655 FcPrivate FcSerialize *
656 FcSerializeCreate (void);
659 FcSerializeDestroy (FcSerialize *serialize);
662 FcSerializeAlloc (FcSerialize *serialize, const void *object, int size);
665 FcSerializeReserve (FcSerialize *serialize, int size);
668 FcSerializeOffset (FcSerialize *serialize, const void *object);
671 FcSerializePtr (FcSerialize *serialize, const void *object);
674 FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l);
676 FcPrivate FcLangSet *
677 FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l);
681 FcLangCharSetPopulate (void);
683 FcPrivate FcCharSetFreezer *
684 FcCharSetFreezerCreate (void);
686 FcPrivate const FcCharSet *
687 FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs);
690 FcCharSetFreezerDestroy (FcCharSetFreezer *freezer);
693 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
695 FcPrivate FcCharSet *
696 FcNameParseCharSet (FcChar8 *string);
699 FcNameUnparseValue (FcStrBuf *buf,
704 FcNameUnparseValueList (FcStrBuf *buf,
708 FcPrivate FcCharLeaf *
709 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
712 FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs);
714 FcPrivate FcCharSet *
715 FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
718 FcCharSetGetNumbers(const FcCharSet *c);
722 FcOpen(const char *pathname, int flags, ...);
725 FcMakeTempfile (char *template);
730 FcValuePrintFile (FILE *f, const FcValue v);
733 FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark);
736 FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos);
739 FcValueListPrint (FcValueListPtr l);
742 FcLangSetPrint (const FcLangSet *ls);
748 FcTestPrint (const FcTest *test);
751 FcExprPrint (const FcExpr *expr);
754 FcEditPrint (const FcEdit *edit);
757 FcSubstPrint (const FcSubst *subst);
760 FcCharSetPrint (const FcCharSet *c);
762 extern FcPrivate int FcDebugVal;
764 #define FcDebug() (FcDebugVal)
771 FcGetDefaultLang (void);
774 FcDefaultFini (void);
779 FcFileIsLink (const FcChar8 *file);
782 FcFileScanConfig (FcFontSet *set,
789 FcDirScanConfig (FcFontSet *set,
803 FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
805 FcPrivate FcFontSet *
806 FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
810 FcTestDestroy (FcTest *test);
813 FcEditDestroy (FcEdit *e);
816 FcPrivate FcLangSet *
817 FcFreeTypeLangSet (const FcCharSet *charset,
818 const FcChar8 *exclusiveLang);
820 FcPrivate FcLangResult
821 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
823 FcPrivate FcLangSet *
824 FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *buf);
826 FcPrivate FcLangSet *
827 FcNameParseLangSet (const FcChar8 *string);
830 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
833 FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
838 FcListPatternMatchAny (const FcPattern *p,
839 const FcPattern *font);
846 FC_INVALID_OBJECT = 0,
847 #define FC_OBJECT(NAME, Type) FC_##NAME##_OBJECT,
850 FC_ONE_AFTER_MAX_BASE_OBJECT
851 #define FC_MAX_BASE_OBJECT (FC_ONE_AFTER_MAX_BASE_OBJECT - 1)
855 FcNameBool (const FcChar8 *v, FcBool *result);
858 FcObjectValidType (FcObject object, FcType type);
861 FcObjectFromName (const char * name);
863 FcPrivate const char *
864 FcObjectName (FcObject object);
866 FcPrivate FcObjectSet *
867 FcObjectGetSet (void);
869 #define FcObjectCompare(a, b) ((int) a - (int) b)
874 FcValueCanonicalize (const FcValue *v);
876 FcPrivate FcValueListPtr
877 FcValueListCreate (void);
880 FcValueListDestroy (FcValueListPtr l);
882 FcPrivate FcValueListPtr
883 FcValueListPrepend (FcValueListPtr vallist,
885 FcValueBinding binding);
887 FcPrivate FcValueListPtr
888 FcValueListAppend (FcValueListPtr vallist,
890 FcValueBinding binding);
892 FcPrivate FcValueListPtr
893 FcValueListDuplicate(FcValueListPtr orig);
895 FcPrivate FcPatternElt *
896 FcPatternObjectFindElt (const FcPattern *p, FcObject object);
898 FcPrivate FcPatternElt *
899 FcPatternObjectInsertElt (FcPattern *p, FcObject object);
902 FcPatternObjectListAdd (FcPattern *p,
908 FcPatternObjectAddWithBinding (FcPattern *p,
911 FcValueBinding binding,
915 FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
918 FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
921 FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
924 FcPatternObjectDel (FcPattern *p, FcObject object);
927 FcPatternObjectRemove (FcPattern *p, FcObject object, int id);
930 FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i);
933 FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d);
936 FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s);
939 FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s);
942 FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c);
945 FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
948 FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
951 FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
954 FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d);
957 FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s);
960 FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s);
963 FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c);
966 FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
969 FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
972 FcPatternAppend (FcPattern *p, FcPattern *s);
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_ */