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]
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 typedef struct _FcPatternElt *FcPatternEltPtr;
180 * Pattern elts are stuck in a structure connected to the pattern,
181 * so they get moved around when the pattern is resized. Hence, the
182 * values field must be a pointer/offset instead of just an offset
184 typedef struct _FcPatternElt {
189 #define FcPatternEltValues(pe) FcPointerMember(pe,values,FcValueList)
194 intptr_t elts_offset;
198 #define FcPatternElts(p) FcOffsetMember(p,elts_offset,FcPatternElt)
200 #define FcFontSetFonts(fs) FcPointerMember(fs,fonts,FcPattern *)
202 #define FcFontSetFont(fs,i) (FcIsEncodedOffset((fs)->fonts) ? \
203 FcEncodedOffsetToPtr(fs, \
204 FcFontSetFonts(fs)[i], \
209 FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpRange, FcOpBool, FcOpCharSet, FcOpLangSet,
211 FcOpField, FcOpConst,
212 FcOpAssign, FcOpAssignReplace,
213 FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
214 FcOpDelete, FcOpDeleteAll,
216 FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
217 FcOpContains, FcOpListing, FcOpNotContains,
218 FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
219 FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
220 FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
224 typedef enum _FcOpFlags {
225 FcOpFlagIgnoreBlanks = 1 << 0
228 #define FC_OP_GET_OP(_x_) ((_x_) & 0xffff)
229 #define FC_OP_GET_FLAGS(_x_) (((_x_) & 0xffff0000) >> 16)
230 #define FC_OP(_x_,_f_) (FC_OP_GET_OP (_x_) | ((_f_) << 16))
232 typedef struct _FcExprMatrix {
233 struct _FcExpr *xx, *xy, *yx, *yy;
236 typedef struct _FcExprName {
242 typedef struct _FcExpr {
255 const FcChar8 *constant;
257 struct _FcExpr *left, *right;
262 typedef struct _FcExprPage FcExprPage;
265 FcExprPage *next_page;
267 FcExpr exprs[(1024 - 2/* two pointers */ - 2/* malloc overhead */) * sizeof (void *) / sizeof (FcExpr)];
268 FcExpr end[FLEXIBLE_ARRAY_MEMBER];
271 typedef enum _FcQual {
272 FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst
275 #define FcMatchDefault ((FcMatchKind) -1)
277 typedef struct _FcTest {
278 struct _FcTest *next;
286 typedef struct _FcEdit {
287 struct _FcEdit *next;
291 FcValueBinding binding;
294 typedef struct _FcSubst {
295 struct _FcSubst *next;
300 typedef struct _FcCharLeaf {
301 FcChar32 map[256/32];
305 FcRef ref; /* reference count */
306 int num; /* size of leaves and numbers arrays */
307 intptr_t leaves_offset;
308 intptr_t numbers_offset;
311 #define FcCharSetLeaves(c) FcOffsetMember(c,leaves_offset,intptr_t)
312 #define FcCharSetLeaf(c,i) (FcOffsetToPtr(FcCharSetLeaves(c), \
313 FcCharSetLeaves(c)[i], \
315 #define FcCharSetNumbers(c) FcOffsetMember(c,numbers_offset,FcChar16)
318 FcRef ref; /* reference count */
329 typedef struct _FcStrBuf {
335 FcChar8 buf_static[16 * sizeof (void *)];
339 unsigned int magic; /* FC_CACHE_MAGIC_MMAP or FC_CACHE_ALLOC */
340 int version; /* FC_CACHE_CONTENT_VERSION */
341 intptr_t size; /* size of file */
342 intptr_t dir; /* offset to dir name */
343 intptr_t dirs; /* offset to subdirs */
344 int dirs_count; /* number of subdir strings */
345 intptr_t set; /* offset to font set */
346 int checksum; /* checksum of directory state */
351 #define FcCacheDir(c) FcOffsetMember(c,dir,FcChar8)
352 #define FcCacheDirs(c) FcOffsetMember(c,dirs,intptr_t)
353 #define FcCacheSet(c) FcOffsetMember(c,set,FcFontSet)
354 #define FcCacheSubdir(c,i) FcOffsetToPtr (FcCacheDirs(c),\
359 * Used while constructing a directory cache object
362 #define FC_SERIALIZE_HASH_SIZE 8191
364 typedef union _FcAlign {
372 typedef struct _FcSerializeBucket {
373 struct _FcSerializeBucket *next;
378 typedef struct _FcCharSetFreezer FcCharSetFreezer;
380 typedef struct _FcSerialize {
382 FcCharSetFreezer *cs_freezer;
384 FcSerializeBucket *buckets[FC_SERIALIZE_HASH_SIZE];
388 * To map adobe glyph names to unicode values, a precomputed hash
392 typedef struct _FcGlyphName {
393 FcChar32 ucs; /* unicode value */
394 FcChar8 name[1]; /* name extends beyond struct */
398 * To perform case-insensitive string comparisons, a table
399 * is used which holds three different kinds of folding data.
401 * The first is a range of upper case values mapping to a range
402 * of their lower case equivalents. Within each range, the offset
403 * between upper and lower case is constant.
405 * The second is a range of upper case values which are interleaved
406 * with their lower case equivalents.
408 * The third is a set of raw unicode values mapping to a list
409 * of unicode values for comparison purposes. This allows conversion
410 * of ß to "ss" so that SS, ss and ß all match. A separate array
411 * holds the list of unicode values for each entry.
413 * These are packed into a single table. Using a binary search,
414 * the appropriate entry can be located.
417 #define FC_CASE_FOLD_RANGE 0
418 #define FC_CASE_FOLD_EVEN_ODD 1
419 #define FC_CASE_FOLD_FULL 2
421 typedef struct _FcCaseFold {
425 short offset; /* lower - upper for RANGE, table id for FULL */
428 #define FC_MAX_FILE_LEN 4096
430 #define FC_CACHE_MAGIC_MMAP 0xFC02FC04
431 #define FC_CACHE_MAGIC_ALLOC 0xFC02FC05
432 #define FC_CACHE_CONTENT_VERSION 4
435 FcChar8 *file; /* original file name */
436 FcChar8 *new; /* temp file name -- write data here */
437 FcChar8 *lck; /* lockfile name (used for locking) */
438 FcChar8 *tmp; /* tmpfile name (used for locking) */
449 * File names loaded from the configuration -- saved here as the
450 * cache file must be consulted before the directories are scanned,
451 * and those directives may occur in any order
453 FcStrSet *configDirs; /* directories to scan for fonts */
455 * Set of allowed blank chars -- used to
456 * trim fonts of bogus glyphs
460 * List of directories containing fonts,
461 * built by recursively scanning the set
462 * of configured directories
466 * List of directories containing cache files.
470 * Names of all of the configuration files used
471 * to create this configuration
473 FcStrSet *configFiles; /* config files loaded */
475 * Substitution instructions for patterns and fonts;
476 * maxObjects is used to allocate appropriate intermediate storage
477 * while performing a whole set of substitutions
479 FcSubst *substPattern; /* substitutions for patterns */
480 FcSubst *substFont; /* substitutions for fonts */
481 FcSubst *substScan; /* substitutions for scanned fonts */
482 int maxObjects; /* maximum number of tests in all substs */
484 * List of patterns used to control font file selection
486 FcStrSet *acceptGlobs;
487 FcStrSet *rejectGlobs;
488 FcFontSet *acceptPatterns;
489 FcFontSet *rejectPatterns;
491 * The set of fonts loaded from the listed directories; the
492 * order within the set does not determine the font selection,
493 * except in the case of identical matches in which case earlier fonts
494 * match preferrentially
496 FcFontSet *fonts[FcSetApplication + 1];
498 * Fontconfig can periodically rescan the system configuration
499 * and font directories. This rescanning occurs when font
500 * listing requests are made, but no more often than rescanInterval
503 time_t rescanTime; /* last time information was scanned */
504 int rescanInterval; /* interval between scans */
506 FcRef ref; /* reference count */
508 FcExprPage *expr_pool; /* pool of FcExpr's */
510 FcChar8 *sysRoot; /* override the system root directory */
513 typedef struct _FcFileTime {
518 typedef struct _FcCharMap FcCharMap;
520 typedef struct _FcRange FcRange;
527 typedef struct _FcStatFS FcStatFS;
531 FcBool is_mtime_broken;
534 typedef struct _FcValuePromotionBuffer FcValuePromotionBuffer;
536 struct _FcValuePromotionBuffer {
541 char c[256]; /* Enlarge as needed */
550 FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
553 FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
556 FcDirCacheWrite (FcCache *cache, FcConfig *config);
559 FcDirCacheCreateTagFile (const FcChar8 *cache_dir);
562 FcCacheObjectReference (void *object);
565 FcCacheObjectDereference (void *object);
571 FcDirCacheReference (FcCache *cache, int nref);
582 FcConfigXdgCacheHome (void);
585 FcConfigXdgConfigHome (void);
588 FcConfigXdgDataHome (void);
591 FcConfigAllocExpr (FcConfig *config);
594 FcConfigAddConfigDir (FcConfig *config,
598 FcConfigAddFontDir (FcConfig *config,
602 FcConfigAddDir (FcConfig *config,
606 FcConfigAddCacheDir (FcConfig *config,
610 FcConfigAddConfigFile (FcConfig *config,
614 FcConfigAddBlank (FcConfig *config,
618 FcConfigAddEdit (FcConfig *config,
624 FcConfigSetFonts (FcConfig *config,
629 FcConfigCompareValue (const FcValue *m,
634 FcConfigGlobAdd (FcConfig *config,
639 FcConfigAcceptFilename (FcConfig *config,
640 const FcChar8 *filename);
643 FcConfigPatternsAdd (FcConfig *config,
648 FcConfigAcceptFont (FcConfig *config,
649 const FcPattern *font);
652 FcConfigModifiedTime (FcConfig *config);
655 FcConfigAddCache (FcConfig *config, FcCache *cache,
656 FcSetName set, FcStrSet *dirSet);
660 FcAlignSize (intptr_t size);
662 FcPrivate FcSerialize *
663 FcSerializeCreate (void);
666 FcSerializeDestroy (FcSerialize *serialize);
669 FcSerializeAlloc (FcSerialize *serialize, const void *object, int size);
672 FcSerializeReserve (FcSerialize *serialize, int size);
675 FcSerializeOffset (FcSerialize *serialize, const void *object);
678 FcSerializePtr (FcSerialize *serialize, const void *object);
681 FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l);
683 FcPrivate FcLangSet *
684 FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l);
688 FcLangCharSetPopulate (void);
690 FcPrivate FcCharSetFreezer *
691 FcCharSetFreezerCreate (void);
693 FcPrivate const FcCharSet *
694 FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs);
697 FcCharSetFreezerDestroy (FcCharSetFreezer *freezer);
700 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
702 FcPrivate FcCharSet *
703 FcNameParseCharSet (FcChar8 *string);
706 FcNameUnparseValue (FcStrBuf *buf,
711 FcNameUnparseValueList (FcStrBuf *buf,
715 FcPrivate FcCharLeaf *
716 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
719 FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs);
721 FcPrivate FcCharSet *
722 FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
725 FcCharSetGetNumbers(const FcCharSet *c);
729 FcOpen(const char *pathname, int flags, ...);
732 FcMakeTempfile (char *template);
740 FcValuePrintFile (FILE *f, const FcValue v);
743 FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark);
746 FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos);
749 FcValueListPrint (FcValueListPtr l);
752 FcLangSetPrint (const FcLangSet *ls);
758 FcTestPrint (const FcTest *test);
761 FcExprPrint (const FcExpr *expr);
764 FcEditPrint (const FcEdit *edit);
767 FcSubstPrint (const FcSubst *subst);
770 FcCharSetPrint (const FcCharSet *c);
772 extern FcPrivate int FcDebugVal;
774 #define FcDebug() (FcDebugVal)
781 FcGetDefaultLang (void);
787 FcDefaultFini (void);
792 FcFileIsLink (const FcChar8 *file);
795 FcFileScanConfig (FcFontSet *set,
802 FcDirScanConfig (FcFontSet *set,
816 FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
818 FcPrivate FcFontSet *
819 FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
823 FcHashGetSHA256Digest (const FcChar8 *input_strings,
827 FcHashGetSHA256DigestFromFile (const FcChar8 *filename);
830 FcHashGetSHA256DigestFromMemory (const char *fontdata,
835 FcInitLoadOwnConfig (FcConfig *config);
838 FcInitLoadOwnConfigAndFonts (FcConfig *config);
842 FcTestDestroy (FcTest *test);
845 FcEditDestroy (FcEdit *e);
848 FcPrivate FcLangSet *
849 FcFreeTypeLangSet (const FcCharSet *charset,
850 const FcChar8 *exclusiveLang);
852 FcPrivate FcLangResult
853 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
855 FcPrivate FcLangSet *
856 FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *buf);
858 FcPrivate FcLangSet *
859 FcNameParseLangSet (const FcChar8 *string);
862 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
865 FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
870 FcListPatternMatchAny (const FcPattern *p,
871 const FcPattern *font);
878 FC_INVALID_OBJECT = 0,
879 #define FC_OBJECT(NAME, Type, Cmp) FC_##NAME##_OBJECT,
882 FC_ONE_AFTER_MAX_BASE_OBJECT
883 #define FC_MAX_BASE_OBJECT (FC_ONE_AFTER_MAX_BASE_OBJECT - 1)
887 FcNameBool (const FcChar8 *v, FcBool *result);
890 FcObjectValidType (FcObject object, FcType type);
893 FcObjectFromName (const char * name);
895 FcPrivate const char *
896 FcObjectName (FcObject object);
898 FcPrivate FcObjectSet *
899 FcObjectGetSet (void);
901 #define FcObjectCompare(a, b) ((int) a - (int) b)
906 FcValueCanonicalize (const FcValue *v);
908 FcPrivate FcValueListPtr
909 FcValueListCreate (void);
912 FcValueListDestroy (FcValueListPtr l);
914 FcPrivate FcValueListPtr
915 FcValueListPrepend (FcValueListPtr vallist,
917 FcValueBinding binding);
919 FcPrivate FcValueListPtr
920 FcValueListAppend (FcValueListPtr vallist,
922 FcValueBinding binding);
924 FcPrivate FcValueListPtr
925 FcValueListDuplicate(FcValueListPtr orig);
927 FcPrivate FcPatternElt *
928 FcPatternObjectFindElt (const FcPattern *p, FcObject object);
930 FcPrivate FcPatternElt *
931 FcPatternObjectInsertElt (FcPattern *p, FcObject object);
934 FcPatternObjectListAdd (FcPattern *p,
940 FcPatternObjectAddWithBinding (FcPattern *p,
943 FcValueBinding binding,
947 FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
950 FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
953 FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
956 FcPatternObjectDel (FcPattern *p, FcObject object);
959 FcPatternObjectRemove (FcPattern *p, FcObject object, int id);
962 FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i);
965 FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d);
968 FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s);
971 FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s);
974 FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c);
977 FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
980 FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
983 FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
986 FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d);
989 FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s);
992 FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s);
995 FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c);
998 FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
1001 FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
1004 FcPatternAppend (FcPattern *p, FcPattern *s);
1007 FcStringHash (const FcChar8 *s);
1010 FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat);
1012 FcPrivate FcPattern *
1013 FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat);
1016 FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat);
1018 FcPrivate FcValueList *
1019 FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat);
1025 extern FcPrivate const FcMatrix FcIdentityMatrix;
1028 FcMatrixFree (FcMatrix *mat);
1033 FcStat (const FcChar8 *file, struct stat *statb);
1036 FcStatChecksum (const FcChar8 *file, struct stat *statb);
1039 FcIsFsMmapSafe (int fd);
1042 FcIsFsMtimeBroken (const FcChar8 *dir);
1046 FcStrSetAddLangs (FcStrSet *strs, const char *languages);
1049 FcStrSetSort (FcStrSet * set);
1052 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
1055 FcStrBufDestroy (FcStrBuf *buf);
1058 FcStrBufDone (FcStrBuf *buf);
1061 FcStrBufDoneStatic (FcStrBuf *buf);
1064 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
1067 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
1070 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
1073 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1076 FcStrCmpIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1079 FcStrRegexCmp (const FcChar8 *s, const FcChar8 *regex);
1082 FcStrRegexCmpIgnoreCase (const FcChar8 *s, const FcChar8 *regex);
1084 FcPrivate const FcChar8 *
1085 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1087 FcPrivate const FcChar8 *
1088 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
1090 FcPrivate const FcChar8 *
1091 FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2);
1094 FcStrMatchIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1097 FcStrGlobMatch (const FcChar8 *glob,
1098 const FcChar8 *string);
1101 FcStrUsesHome (const FcChar8 *s);
1104 FcStrBuildFilename (const FcChar8 *path,
1108 FcStrLastSlash (const FcChar8 *path);
1111 FcStrHashIgnoreCase (const FcChar8 *s);
1114 FcStrCanonFilename (const FcChar8 *s);
1117 FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
1120 FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
1125 FcObjectLookupIdByName (const char *str);
1128 FcObjectLookupBuiltinIdByName (const char *str);
1130 FcPrivate const char *
1131 FcObjectLookupOtherNameById (FcObject id);
1133 FcPrivate const FcObjectType *
1134 FcObjectLookupOtherTypeById (FcObject id);
1136 FcPrivate const FcObjectType *
1137 FcObjectLookupOtherTypeByName (const char *str);
1139 #endif /* _FC_INT_H_ */