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,
211 FcOpDelete, FcOpDeleteAll,
213 FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
214 FcOpContains, FcOpListing, FcOpNotContains,
215 FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
216 FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
217 FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
221 typedef enum _FcOpFlags {
222 FcOpFlagIgnoreBlanks = 1 << 0
225 #define FC_OP_GET_OP(_x_) ((_x_) & 0xffff)
226 #define FC_OP_GET_FLAGS(_x_) (((_x_) & 0xffff0000) >> 16)
227 #define FC_OP(_x_,_f_) (FC_OP_GET_OP (_x_) | ((_f_) << 16))
229 typedef struct _FcExprMatrix {
230 struct _FcExpr *xx, *xy, *yx, *yy;
233 typedef struct _FcExprName {
239 typedef struct _FcExpr {
251 const FcChar8 *constant;
253 struct _FcExpr *left, *right;
258 typedef struct _FcExprPage FcExprPage;
261 FcExprPage *next_page;
263 FcExpr exprs[(1024 - 2/* two pointers */ - 2/* malloc overhead */) * sizeof (void *) / sizeof (FcExpr)];
264 FcExpr end[FLEXIBLE_ARRAY_MEMBER];
267 typedef enum _FcQual {
268 FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst
271 #define FcMatchDefault ((FcMatchKind) -1)
273 typedef struct _FcTest {
274 struct _FcTest *next;
282 typedef struct _FcEdit {
283 struct _FcEdit *next;
287 FcValueBinding binding;
290 typedef struct _FcSubst {
291 struct _FcSubst *next;
296 typedef struct _FcCharLeaf {
297 FcChar32 map[256/32];
301 FcRef ref; /* reference count */
302 int num; /* size of leaves and numbers arrays */
303 intptr_t leaves_offset;
304 intptr_t numbers_offset;
307 #define FcCharSetLeaves(c) FcOffsetMember(c,leaves_offset,intptr_t)
308 #define FcCharSetLeaf(c,i) (FcOffsetToPtr(FcCharSetLeaves(c), \
309 FcCharSetLeaves(c)[i], \
311 #define FcCharSetNumbers(c) FcOffsetMember(c,numbers_offset,FcChar16)
314 FcRef ref; /* reference count */
325 typedef struct _FcStrBuf {
331 FcChar8 buf_static[16 * sizeof (void *)];
335 unsigned int magic; /* FC_CACHE_MAGIC_MMAP or FC_CACHE_ALLOC */
336 int version; /* FC_CACHE_CONTENT_VERSION */
337 intptr_t size; /* size of file */
338 intptr_t dir; /* offset to dir name */
339 intptr_t dirs; /* offset to subdirs */
340 int dirs_count; /* number of subdir strings */
341 intptr_t set; /* offset to font set */
342 int checksum; /* checksum of directory state */
347 #define FcCacheDir(c) FcOffsetMember(c,dir,FcChar8)
348 #define FcCacheDirs(c) FcOffsetMember(c,dirs,intptr_t)
349 #define FcCacheSet(c) FcOffsetMember(c,set,FcFontSet)
350 #define FcCacheSubdir(c,i) FcOffsetToPtr (FcCacheDirs(c),\
355 * Used while constructing a directory cache object
358 #define FC_SERIALIZE_HASH_SIZE 8191
360 typedef union _FcAlign {
368 typedef struct _FcSerializeBucket {
369 struct _FcSerializeBucket *next;
374 typedef struct _FcCharSetFreezer FcCharSetFreezer;
376 typedef struct _FcSerialize {
378 FcCharSetFreezer *cs_freezer;
380 FcSerializeBucket *buckets[FC_SERIALIZE_HASH_SIZE];
384 * To map adobe glyph names to unicode values, a precomputed hash
388 typedef struct _FcGlyphName {
389 FcChar32 ucs; /* unicode value */
390 FcChar8 name[1]; /* name extends beyond struct */
394 * To perform case-insensitive string comparisons, a table
395 * is used which holds three different kinds of folding data.
397 * The first is a range of upper case values mapping to a range
398 * of their lower case equivalents. Within each range, the offset
399 * between upper and lower case is constant.
401 * The second is a range of upper case values which are interleaved
402 * with their lower case equivalents.
404 * The third is a set of raw unicode values mapping to a list
405 * of unicode values for comparison purposes. This allows conversion
406 * of ß to "ss" so that SS, ss and ß all match. A separate array
407 * holds the list of unicode values for each entry.
409 * These are packed into a single table. Using a binary search,
410 * the appropriate entry can be located.
413 #define FC_CASE_FOLD_RANGE 0
414 #define FC_CASE_FOLD_EVEN_ODD 1
415 #define FC_CASE_FOLD_FULL 2
417 typedef struct _FcCaseFold {
421 short offset; /* lower - upper for RANGE, table id for FULL */
424 #define FC_MAX_FILE_LEN 4096
426 #define FC_CACHE_MAGIC_MMAP 0xFC02FC04
427 #define FC_CACHE_MAGIC_ALLOC 0xFC02FC05
428 #define FC_CACHE_CONTENT_VERSION 4
431 FcChar8 *file; /* original file name */
432 FcChar8 *new; /* temp file name -- write data here */
433 FcChar8 *lck; /* lockfile name (used for locking) */
434 FcChar8 *tmp; /* tmpfile name (used for locking) */
445 * File names loaded from the configuration -- saved here as the
446 * cache file must be consulted before the directories are scanned,
447 * and those directives may occur in any order
449 FcStrSet *configDirs; /* directories to scan for fonts */
451 * Set of allowed blank chars -- used to
452 * trim fonts of bogus glyphs
456 * List of directories containing fonts,
457 * built by recursively scanning the set
458 * of configured directories
462 * List of directories containing cache files.
466 * Names of all of the configuration files used
467 * to create this configuration
469 FcStrSet *configFiles; /* config files loaded */
471 * Substitution instructions for patterns and fonts;
472 * maxObjects is used to allocate appropriate intermediate storage
473 * while performing a whole set of substitutions
475 FcSubst *substPattern; /* substitutions for patterns */
476 FcSubst *substFont; /* substitutions for fonts */
477 FcSubst *substScan; /* substitutions for scanned fonts */
478 int maxObjects; /* maximum number of tests in all substs */
480 * List of patterns used to control font file selection
482 FcStrSet *acceptGlobs;
483 FcStrSet *rejectGlobs;
484 FcFontSet *acceptPatterns;
485 FcFontSet *rejectPatterns;
487 * The set of fonts loaded from the listed directories; the
488 * order within the set does not determine the font selection,
489 * except in the case of identical matches in which case earlier fonts
490 * match preferrentially
492 FcFontSet *fonts[FcSetApplication + 1];
494 * Fontconfig can periodically rescan the system configuration
495 * and font directories. This rescanning occurs when font
496 * listing requests are made, but no more often than rescanInterval
499 time_t rescanTime; /* last time information was scanned */
500 int rescanInterval; /* interval between scans */
502 FcRef ref; /* reference count */
504 FcExprPage *expr_pool; /* pool of FcExpr's */
506 FcChar8 *sysRoot; /* override the system root directory */
509 typedef struct _FcFileTime {
514 typedef struct _FcCharMap FcCharMap;
516 typedef struct _FcRange FcRange;
523 typedef struct _FcStatFS FcStatFS;
527 FcBool is_mtime_broken;
530 typedef struct _FcValuePromotionBuffer FcValuePromotionBuffer;
532 struct _FcValuePromotionBuffer {
537 char c[256]; /* Enlarge as needed */
546 FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
549 FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
552 FcDirCacheWrite (FcCache *cache, FcConfig *config);
555 FcDirCacheCreateTagFile (const FcChar8 *cache_dir);
558 FcCacheObjectReference (void *object);
561 FcCacheObjectDereference (void *object);
567 FcDirCacheReference (FcCache *cache, int nref);
578 FcConfigXdgCacheHome (void);
581 FcConfigXdgConfigHome (void);
584 FcConfigXdgDataHome (void);
587 FcConfigAllocExpr (FcConfig *config);
590 FcConfigAddConfigDir (FcConfig *config,
594 FcConfigAddFontDir (FcConfig *config,
598 FcConfigAddDir (FcConfig *config,
602 FcConfigAddCacheDir (FcConfig *config,
606 FcConfigAddConfigFile (FcConfig *config,
610 FcConfigAddBlank (FcConfig *config,
614 FcConfigAddEdit (FcConfig *config,
620 FcConfigSetFonts (FcConfig *config,
625 FcConfigCompareValue (const FcValue *m,
630 FcConfigGlobAdd (FcConfig *config,
635 FcConfigAcceptFilename (FcConfig *config,
636 const FcChar8 *filename);
639 FcConfigPatternsAdd (FcConfig *config,
644 FcConfigAcceptFont (FcConfig *config,
645 const FcPattern *font);
648 FcConfigModifiedTime (FcConfig *config);
651 FcConfigAddCache (FcConfig *config, FcCache *cache,
652 FcSetName set, FcStrSet *dirSet);
656 FcAlignSize (intptr_t size);
658 FcPrivate FcSerialize *
659 FcSerializeCreate (void);
662 FcSerializeDestroy (FcSerialize *serialize);
665 FcSerializeAlloc (FcSerialize *serialize, const void *object, int size);
668 FcSerializeReserve (FcSerialize *serialize, int size);
671 FcSerializeOffset (FcSerialize *serialize, const void *object);
674 FcSerializePtr (FcSerialize *serialize, const void *object);
677 FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l);
679 FcPrivate FcLangSet *
680 FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l);
684 FcLangCharSetPopulate (void);
686 FcPrivate FcCharSetFreezer *
687 FcCharSetFreezerCreate (void);
689 FcPrivate const FcCharSet *
690 FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs);
693 FcCharSetFreezerDestroy (FcCharSetFreezer *freezer);
696 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
698 FcPrivate FcCharSet *
699 FcNameParseCharSet (FcChar8 *string);
702 FcNameUnparseValue (FcStrBuf *buf,
707 FcNameUnparseValueList (FcStrBuf *buf,
711 FcPrivate FcCharLeaf *
712 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
715 FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs);
717 FcPrivate FcCharSet *
718 FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
721 FcCharSetGetNumbers(const FcCharSet *c);
725 FcOpen(const char *pathname, int flags, ...);
728 FcMakeTempfile (char *template);
736 FcValuePrintFile (FILE *f, const FcValue v);
739 FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark);
742 FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos);
745 FcValueListPrint (FcValueListPtr l);
748 FcLangSetPrint (const FcLangSet *ls);
754 FcTestPrint (const FcTest *test);
757 FcExprPrint (const FcExpr *expr);
760 FcEditPrint (const FcEdit *edit);
763 FcSubstPrint (const FcSubst *subst);
766 FcCharSetPrint (const FcCharSet *c);
768 extern FcPrivate int FcDebugVal;
770 #define FcDebug() (FcDebugVal)
777 FcGetDefaultLang (void);
783 FcDefaultFini (void);
788 FcFileIsLink (const FcChar8 *file);
791 FcFileScanConfig (FcFontSet *set,
798 FcDirScanConfig (FcFontSet *set,
812 FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
814 FcPrivate FcFontSet *
815 FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
819 FcHashGetSHA256Digest (const FcChar8 *input_strings,
823 FcHashGetSHA256DigestFromFile (const FcChar8 *filename);
826 FcHashGetSHA256DigestFromMemory (const char *fontdata,
831 FcInitLoadOwnConfig (FcConfig *config);
834 FcInitLoadOwnConfigAndFonts (FcConfig *config);
838 FcTestDestroy (FcTest *test);
841 FcEditDestroy (FcEdit *e);
844 FcPrivate FcLangSet *
845 FcFreeTypeLangSet (const FcCharSet *charset,
846 const FcChar8 *exclusiveLang);
848 FcPrivate FcLangResult
849 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
851 FcPrivate FcLangSet *
852 FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *buf);
854 FcPrivate FcLangSet *
855 FcNameParseLangSet (const FcChar8 *string);
858 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
861 FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
866 FcListPatternMatchAny (const FcPattern *p,
867 const FcPattern *font);
874 FC_INVALID_OBJECT = 0,
875 #define FC_OBJECT(NAME, Type, Cmp) FC_##NAME##_OBJECT,
878 FC_ONE_AFTER_MAX_BASE_OBJECT
879 #define FC_MAX_BASE_OBJECT (FC_ONE_AFTER_MAX_BASE_OBJECT - 1)
883 FcNameBool (const FcChar8 *v, FcBool *result);
886 FcObjectValidType (FcObject object, FcType type);
889 FcObjectFromName (const char * name);
891 FcPrivate const char *
892 FcObjectName (FcObject object);
894 FcPrivate FcObjectSet *
895 FcObjectGetSet (void);
897 #define FcObjectCompare(a, b) ((int) a - (int) b)
902 FcValueCanonicalize (const FcValue *v);
904 FcPrivate FcValueListPtr
905 FcValueListCreate (void);
908 FcValueListDestroy (FcValueListPtr l);
910 FcPrivate FcValueListPtr
911 FcValueListPrepend (FcValueListPtr vallist,
913 FcValueBinding binding);
915 FcPrivate FcValueListPtr
916 FcValueListAppend (FcValueListPtr vallist,
918 FcValueBinding binding);
920 FcPrivate FcValueListPtr
921 FcValueListDuplicate(FcValueListPtr orig);
923 FcPrivate FcPatternElt *
924 FcPatternObjectFindElt (const FcPattern *p, FcObject object);
926 FcPrivate FcPatternElt *
927 FcPatternObjectInsertElt (FcPattern *p, FcObject object);
930 FcPatternObjectListAdd (FcPattern *p,
936 FcPatternObjectAddWithBinding (FcPattern *p,
939 FcValueBinding binding,
943 FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
946 FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
949 FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
952 FcPatternObjectDel (FcPattern *p, FcObject object);
955 FcPatternObjectRemove (FcPattern *p, FcObject object, int id);
958 FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i);
961 FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d);
964 FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s);
967 FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s);
970 FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c);
973 FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
976 FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
979 FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
982 FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d);
985 FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s);
988 FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s);
991 FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c);
994 FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
997 FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
1000 FcPatternAppend (FcPattern *p, FcPattern *s);
1003 FcStringHash (const FcChar8 *s);
1006 FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat);
1008 FcPrivate FcPattern *
1009 FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat);
1012 FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat);
1014 FcPrivate FcValueList *
1015 FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat);
1021 extern FcPrivate const FcMatrix FcIdentityMatrix;
1024 FcMatrixFree (FcMatrix *mat);
1029 FcStat (const FcChar8 *file, struct stat *statb);
1032 FcStatChecksum (const FcChar8 *file, struct stat *statb);
1035 FcIsFsMmapSafe (int fd);
1038 FcIsFsMtimeBroken (const FcChar8 *dir);
1042 FcStrSetAddLangs (FcStrSet *strs, const char *languages);
1045 FcStrSetSort (FcStrSet * set);
1048 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
1051 FcStrBufDestroy (FcStrBuf *buf);
1054 FcStrBufDone (FcStrBuf *buf);
1057 FcStrBufDoneStatic (FcStrBuf *buf);
1060 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
1063 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
1066 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
1069 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1072 FcStrCmpIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1075 FcStrRegexCmp (const FcChar8 *s, const FcChar8 *regex);
1078 FcStrRegexCmpIgnoreCase (const FcChar8 *s, const FcChar8 *regex);
1080 FcPrivate const FcChar8 *
1081 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1083 FcPrivate const FcChar8 *
1084 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
1086 FcPrivate const FcChar8 *
1087 FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2);
1090 FcStrMatchIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1093 FcStrGlobMatch (const FcChar8 *glob,
1094 const FcChar8 *string);
1097 FcStrUsesHome (const FcChar8 *s);
1100 FcStrBuildFilename (const FcChar8 *path,
1104 FcStrLastSlash (const FcChar8 *path);
1107 FcStrHashIgnoreCase (const FcChar8 *s);
1110 FcStrCanonFilename (const FcChar8 *s);
1113 FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
1116 FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
1121 FcObjectLookupIdByName (const char *str);
1124 FcObjectLookupBuiltinIdByName (const char *str);
1126 FcPrivate const char *
1127 FcObjectLookupOtherNameById (FcObject id);
1129 FcPrivate const FcObjectType *
1130 FcObjectLookupOtherTypeById (FcObject id);
1132 FcPrivate const FcObjectType *
1133 FcObjectLookupOtherTypeByName (const char *str);
1135 #endif /* _FC_INT_H_ */