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 typedef struct _FcFileTime {
513 typedef struct _FcCharMap FcCharMap;
515 typedef struct _FcRange FcRange;
522 typedef struct _FcStatFS FcStatFS;
526 FcBool is_mtime_broken;
529 typedef struct _FcValuePromotionBuffer FcValuePromotionBuffer;
531 struct _FcValuePromotionBuffer {
536 char c[256]; /* Enlarge as needed */
545 FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
548 FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
551 FcDirCacheWrite (FcCache *cache, FcConfig *config);
554 FcDirCacheCreateTagFile (const FcChar8 *cache_dir);
557 FcCacheObjectReference (void *object);
560 FcCacheObjectDereference (void *object);
566 FcDirCacheReference (FcCache *cache, int nref);
577 FcConfigXdgCacheHome (void);
580 FcConfigXdgConfigHome (void);
583 FcConfigXdgDataHome (void);
586 FcConfigAllocExpr (FcConfig *config);
589 FcConfigAddConfigDir (FcConfig *config,
593 FcConfigAddFontDir (FcConfig *config,
597 FcConfigAddDir (FcConfig *config,
601 FcConfigAddCacheDir (FcConfig *config,
605 FcConfigAddConfigFile (FcConfig *config,
609 FcConfigAddBlank (FcConfig *config,
613 FcConfigAddEdit (FcConfig *config,
619 FcConfigSetFonts (FcConfig *config,
624 FcConfigCompareValue (const FcValue *m,
629 FcConfigGlobAdd (FcConfig *config,
634 FcConfigAcceptFilename (FcConfig *config,
635 const FcChar8 *filename);
638 FcConfigPatternsAdd (FcConfig *config,
643 FcConfigAcceptFont (FcConfig *config,
644 const FcPattern *font);
647 FcConfigModifiedTime (FcConfig *config);
650 FcConfigAddCache (FcConfig *config, FcCache *cache,
651 FcSetName set, FcStrSet *dirSet);
655 FcAlignSize (intptr_t size);
657 FcPrivate FcSerialize *
658 FcSerializeCreate (void);
661 FcSerializeDestroy (FcSerialize *serialize);
664 FcSerializeAlloc (FcSerialize *serialize, const void *object, int size);
667 FcSerializeReserve (FcSerialize *serialize, int size);
670 FcSerializeOffset (FcSerialize *serialize, const void *object);
673 FcSerializePtr (FcSerialize *serialize, const void *object);
676 FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l);
678 FcPrivate FcLangSet *
679 FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l);
683 FcLangCharSetPopulate (void);
685 FcPrivate FcCharSetFreezer *
686 FcCharSetFreezerCreate (void);
688 FcPrivate const FcCharSet *
689 FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs);
692 FcCharSetFreezerDestroy (FcCharSetFreezer *freezer);
695 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
697 FcPrivate FcCharSet *
698 FcNameParseCharSet (FcChar8 *string);
701 FcNameUnparseValue (FcStrBuf *buf,
706 FcNameUnparseValueList (FcStrBuf *buf,
710 FcPrivate FcCharLeaf *
711 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
714 FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs);
716 FcPrivate FcCharSet *
717 FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
720 FcCharSetGetNumbers(const FcCharSet *c);
725 FcValuePrintFile (FILE *f, const FcValue v);
728 FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark);
731 FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos);
734 FcValueListPrint (FcValueListPtr l);
737 FcLangSetPrint (const FcLangSet *ls);
743 FcTestPrint (const FcTest *test);
746 FcExprPrint (const FcExpr *expr);
749 FcEditPrint (const FcEdit *edit);
752 FcSubstPrint (const FcSubst *subst);
755 FcCharSetPrint (const FcCharSet *c);
757 extern FcPrivate int FcDebugVal;
759 #define FcDebug() (FcDebugVal)
766 FcGetDefaultLang (void);
769 FcDefaultFini (void);
774 FcFileIsLink (const FcChar8 *file);
777 FcFileScanConfig (FcFontSet *set,
784 FcDirScanConfig (FcFontSet *set,
798 FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
800 FcPrivate FcFontSet *
801 FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
805 FcTestDestroy (FcTest *test);
808 FcEditDestroy (FcEdit *e);
811 FcPrivate FcLangSet *
812 FcFreeTypeLangSet (const FcCharSet *charset,
813 const FcChar8 *exclusiveLang);
816 FcLangNormalize (const FcChar8 *lang);
818 FcPrivate FcLangResult
819 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
821 FcPrivate FcLangSet *
822 FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *buf);
824 FcPrivate FcLangSet *
825 FcNameParseLangSet (const FcChar8 *string);
828 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
831 FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
836 FcListPatternMatchAny (const FcPattern *p,
837 const FcPattern *font);
844 FC_INVALID_OBJECT = 0,
845 #define FC_OBJECT(NAME, Type) FC_##NAME##_OBJECT,
848 FC_ONE_AFTER_MAX_BASE_OBJECT
849 #define FC_MAX_BASE_OBJECT (FC_ONE_AFTER_MAX_BASE_OBJECT - 1)
853 FcNameBool (const FcChar8 *v, FcBool *result);
856 FcObjectValidType (FcObject object, FcType type);
859 FcObjectFromName (const char * name);
861 FcPrivate const char *
862 FcObjectName (FcObject object);
864 FcPrivate FcObjectSet *
865 FcObjectGetSet (void);
867 #define FcObjectCompare(a, b) ((int) a - (int) b)
872 FcValueCanonicalize (const FcValue *v);
874 FcPrivate FcValueListPtr
875 FcValueListCreate (void);
878 FcValueListDestroy (FcValueListPtr l);
880 FcPrivate FcValueListPtr
881 FcValueListPrepend (FcValueListPtr vallist,
883 FcValueBinding binding);
885 FcPrivate FcValueListPtr
886 FcValueListAppend (FcValueListPtr vallist,
888 FcValueBinding binding);
890 FcPrivate FcValueListPtr
891 FcValueListDuplicate(FcValueListPtr orig);
893 FcPrivate FcPatternElt *
894 FcPatternObjectFindElt (const FcPattern *p, FcObject object);
896 FcPrivate FcPatternElt *
897 FcPatternObjectInsertElt (FcPattern *p, FcObject object);
900 FcPatternObjectListAdd (FcPattern *p,
906 FcPatternObjectAddWithBinding (FcPattern *p,
909 FcValueBinding binding,
913 FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
916 FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
919 FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
922 FcPatternObjectDel (FcPattern *p, FcObject object);
925 FcPatternObjectRemove (FcPattern *p, FcObject object, int id);
928 FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i);
931 FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d);
934 FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s);
937 FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s);
940 FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c);
943 FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
946 FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
949 FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
952 FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d);
955 FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s);
958 FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s);
961 FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c);
964 FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
967 FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
970 FcPatternAppend (FcPattern *p, FcPattern *s);
972 FcPrivate const FcChar8 *
973 FcSharedStr (const FcChar8 *name);
976 FcSharedStrFree (FcChar8 *name);
979 FcStringHash (const FcChar8 *s);
982 FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat);
984 FcPrivate FcPattern *
985 FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat);
988 FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat);
990 FcPrivate FcValueList *
991 FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat);
997 extern FcPrivate const FcMatrix FcIdentityMatrix;
1000 FcMatrixFree (FcMatrix *mat);
1005 FcStat (const FcChar8 *file, struct stat *statb);
1008 FcStatChecksum (const FcChar8 *file, struct stat *statb);
1011 FcIsFsMmapSafe (int fd);
1014 FcIsFsMtimeBroken (const FcChar8 *dir);
1018 FcStrSetAddLangs (FcStrSet *strs, const char *languages);
1021 FcStrSetSort (FcStrSet * set);
1024 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
1027 FcStrBufDestroy (FcStrBuf *buf);
1030 FcStrBufDone (FcStrBuf *buf);
1033 FcStrBufDoneStatic (FcStrBuf *buf);
1036 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
1039 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
1042 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
1045 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1048 FcStrRegexCmp (const FcChar8 *s, const FcChar8 *regex);
1051 FcStrRegexCmpIgnoreCase (const FcChar8 *s, const FcChar8 *regex);
1053 FcPrivate const FcChar8 *
1054 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1056 FcPrivate const FcChar8 *
1057 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
1059 FcPrivate const FcChar8 *
1060 FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2);
1063 FcStrUsesHome (const FcChar8 *s);
1066 FcStrLastSlash (const FcChar8 *path);
1069 FcStrHashIgnoreCase (const FcChar8 *s);
1072 FcStrCanonFilename (const FcChar8 *s);
1075 FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
1078 FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
1083 FcObjectLookupIdByName (const char *str);
1086 FcObjectLookupBuiltinIdByName (const char *str);
1088 FcPrivate const char *
1089 FcObjectLookupOtherNameById (FcObject id);
1091 FcPrivate const FcObjectType *
1092 FcObjectLookupOtherTypeById (FcObject id);
1094 FcPrivate const FcObjectType *
1095 FcObjectLookupOtherTypeByName (const char *str);
1097 #endif /* _FC_INT_H_ */