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] FC_UNUSED
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 {
254 const FcChar8 *constant;
256 struct _FcExpr *left, *right;
261 typedef struct _FcExprPage FcExprPage;
264 FcExprPage *next_page;
266 FcExpr exprs[(1024 - 2/* two pointers */ - 2/* malloc overhead */) * sizeof (void *) / sizeof (FcExpr)];
267 FcExpr end[FLEXIBLE_ARRAY_MEMBER];
270 typedef enum _FcQual {
271 FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst
274 #define FcMatchDefault ((FcMatchKind) -1)
276 typedef struct _FcTest {
284 typedef struct _FcEdit {
288 FcValueBinding binding;
291 typedef enum _FcRuleType {
292 FcRuleUnknown, FcRuleTest, FcRuleEdit
295 typedef struct _FcRule {
296 struct _FcRule *next;
304 typedef struct _FcSubst {
305 struct _FcSubst *next;
309 typedef struct _FcCharLeaf {
310 FcChar32 map[256/32];
314 FcRef ref; /* reference count */
315 int num; /* size of leaves and numbers arrays */
316 intptr_t leaves_offset;
317 intptr_t numbers_offset;
320 #define FcCharSetLeaves(c) FcOffsetMember(c,leaves_offset,intptr_t)
321 #define FcCharSetLeaf(c,i) (FcOffsetToPtr(FcCharSetLeaves(c), \
322 FcCharSetLeaves(c)[i], \
324 #define FcCharSetNumbers(c) FcOffsetMember(c,numbers_offset,FcChar16)
327 FcRef ref; /* reference count */
338 typedef struct _FcStrBuf {
344 FcChar8 buf_static[16 * sizeof (void *)];
348 unsigned int magic; /* FC_CACHE_MAGIC_MMAP or FC_CACHE_ALLOC */
349 int version; /* FC_CACHE_CONTENT_VERSION */
350 intptr_t size; /* size of file */
351 intptr_t dir; /* offset to dir name */
352 intptr_t dirs; /* offset to subdirs */
353 int dirs_count; /* number of subdir strings */
354 intptr_t set; /* offset to font set */
355 int checksum; /* checksum of directory state */
360 #define FcCacheDir(c) FcOffsetMember(c,dir,FcChar8)
361 #define FcCacheDirs(c) FcOffsetMember(c,dirs,intptr_t)
362 #define FcCacheSet(c) FcOffsetMember(c,set,FcFontSet)
363 #define FcCacheSubdir(c,i) FcOffsetToPtr (FcCacheDirs(c),\
368 * Used while constructing a directory cache object
371 #define FC_SERIALIZE_HASH_SIZE 8191
373 typedef union _FcAlign {
381 typedef struct _FcSerializeBucket {
382 struct _FcSerializeBucket *next;
387 typedef struct _FcCharSetFreezer FcCharSetFreezer;
389 typedef struct _FcSerialize {
391 FcCharSetFreezer *cs_freezer;
393 FcSerializeBucket *buckets[FC_SERIALIZE_HASH_SIZE];
397 * To map adobe glyph names to unicode values, a precomputed hash
401 typedef struct _FcGlyphName {
402 FcChar32 ucs; /* unicode value */
403 FcChar8 name[1]; /* name extends beyond struct */
407 * To perform case-insensitive string comparisons, a table
408 * is used which holds three different kinds of folding data.
410 * The first is a range of upper case values mapping to a range
411 * of their lower case equivalents. Within each range, the offset
412 * between upper and lower case is constant.
414 * The second is a range of upper case values which are interleaved
415 * with their lower case equivalents.
417 * The third is a set of raw unicode values mapping to a list
418 * of unicode values for comparison purposes. This allows conversion
419 * of ß to "ss" so that SS, ss and ß all match. A separate array
420 * holds the list of unicode values for each entry.
422 * These are packed into a single table. Using a binary search,
423 * the appropriate entry can be located.
426 #define FC_CASE_FOLD_RANGE 0
427 #define FC_CASE_FOLD_EVEN_ODD 1
428 #define FC_CASE_FOLD_FULL 2
430 typedef struct _FcCaseFold {
434 short offset; /* lower - upper for RANGE, table id for FULL */
437 #define FC_MAX_FILE_LEN 4096
439 #define FC_CACHE_MAGIC_MMAP 0xFC02FC04
440 #define FC_CACHE_MAGIC_ALLOC 0xFC02FC05
441 #define FC_CACHE_CONTENT_VERSION 4
444 FcChar8 *file; /* original file name */
445 FcChar8 *new; /* temp file name -- write data here */
446 FcChar8 *lck; /* lockfile name (used for locking) */
447 FcChar8 *tmp; /* tmpfile name (used for locking) */
458 * File names loaded from the configuration -- saved here as the
459 * cache file must be consulted before the directories are scanned,
460 * and those directives may occur in any order
462 FcStrSet *configDirs; /* directories to scan for fonts */
464 * Set of allowed blank chars -- used to
465 * trim fonts of bogus glyphs
469 * List of directories containing fonts,
470 * built by recursively scanning the set
471 * of configured directories
475 * List of directories containing cache files.
479 * Names of all of the configuration files used
480 * to create this configuration
482 FcStrSet *configFiles; /* config files loaded */
484 * Substitution instructions for patterns and fonts;
485 * maxObjects is used to allocate appropriate intermediate storage
486 * while performing a whole set of substitutions
488 FcSubst *substPattern; /* substitutions for patterns */
489 FcSubst *substFont; /* substitutions for fonts */
490 FcSubst *substScan; /* substitutions for scanned fonts */
491 int maxObjects; /* maximum number of tests in all substs */
493 * List of patterns used to control font file selection
495 FcStrSet *acceptGlobs;
496 FcStrSet *rejectGlobs;
497 FcFontSet *acceptPatterns;
498 FcFontSet *rejectPatterns;
500 * The set of fonts loaded from the listed directories; the
501 * order within the set does not determine the font selection,
502 * except in the case of identical matches in which case earlier fonts
503 * match preferrentially
505 FcFontSet *fonts[FcSetApplication + 1];
507 * Fontconfig can periodically rescan the system configuration
508 * and font directories. This rescanning occurs when font
509 * listing requests are made, but no more often than rescanInterval
512 time_t rescanTime; /* last time information was scanned */
513 int rescanInterval; /* interval between scans */
515 FcRef ref; /* reference count */
517 FcExprPage *expr_pool; /* pool of FcExpr's */
519 FcChar8 *sysRoot; /* override the system root directory */
522 typedef struct _FcFileTime {
527 typedef struct _FcCharMap FcCharMap;
529 typedef struct _FcRange FcRange;
536 typedef struct _FcStatFS FcStatFS;
540 FcBool is_mtime_broken;
543 typedef struct _FcValuePromotionBuffer FcValuePromotionBuffer;
545 struct _FcValuePromotionBuffer {
550 char c[256]; /* Enlarge as needed */
559 FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
562 FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
565 FcDirCacheWrite (FcCache *cache, FcConfig *config);
568 FcDirCacheCreateTagFile (const FcChar8 *cache_dir);
571 FcCacheObjectReference (void *object);
574 FcCacheObjectDereference (void *object);
580 FcDirCacheReference (FcCache *cache, int nref);
591 FcConfigXdgCacheHome (void);
594 FcConfigXdgConfigHome (void);
597 FcConfigXdgDataHome (void);
600 FcConfigAllocExpr (FcConfig *config);
603 FcConfigAddConfigDir (FcConfig *config,
607 FcConfigAddFontDir (FcConfig *config,
611 FcConfigAddDir (FcConfig *config,
615 FcConfigAddCacheDir (FcConfig *config,
619 FcConfigAddConfigFile (FcConfig *config,
623 FcConfigAddBlank (FcConfig *config,
627 FcConfigAddRule (FcConfig *config,
632 FcConfigSetFonts (FcConfig *config,
637 FcConfigCompareValue (const FcValue *m,
642 FcConfigGlobAdd (FcConfig *config,
647 FcConfigAcceptFilename (FcConfig *config,
648 const FcChar8 *filename);
651 FcConfigPatternsAdd (FcConfig *config,
656 FcConfigAcceptFont (FcConfig *config,
657 const FcPattern *font);
660 FcConfigModifiedTime (FcConfig *config);
663 FcConfigAddCache (FcConfig *config, FcCache *cache,
664 FcSetName set, FcStrSet *dirSet);
668 FcAlignSize (intptr_t size);
670 FcPrivate FcSerialize *
671 FcSerializeCreate (void);
674 FcSerializeDestroy (FcSerialize *serialize);
677 FcSerializeAlloc (FcSerialize *serialize, const void *object, int size);
680 FcSerializeReserve (FcSerialize *serialize, int size);
683 FcSerializeOffset (FcSerialize *serialize, const void *object);
686 FcSerializePtr (FcSerialize *serialize, const void *object);
689 FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l);
691 FcPrivate FcLangSet *
692 FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l);
696 FcLangCharSetPopulate (void);
698 FcPrivate FcCharSetFreezer *
699 FcCharSetFreezerCreate (void);
701 FcPrivate const FcCharSet *
702 FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs);
705 FcCharSetFreezerDestroy (FcCharSetFreezer *freezer);
708 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
710 FcPrivate FcCharSet *
711 FcNameParseCharSet (FcChar8 *string);
714 FcNameUnparseValue (FcStrBuf *buf,
719 FcNameUnparseValueList (FcStrBuf *buf,
723 FcPrivate FcCharLeaf *
724 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
727 FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs);
729 FcPrivate FcCharSet *
730 FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
733 FcCharSetGetNumbers(const FcCharSet *c);
737 FcOpen(const char *pathname, int flags, ...);
740 FcMakeTempfile (char *template);
748 FcValuePrintFile (FILE *f, const FcValue v);
751 FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark);
754 FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos);
757 FcValueListPrint (FcValueListPtr l);
760 FcLangSetPrint (const FcLangSet *ls);
766 FcTestPrint (const FcTest *test);
769 FcExprPrint (const FcExpr *expr);
772 FcEditPrint (const FcEdit *edit);
775 FcSubstPrint (const FcSubst *subst);
778 FcCharSetPrint (const FcCharSet *c);
780 extern FcPrivate int FcDebugVal;
782 #define FcDebug() (FcDebugVal)
789 FcGetDefaultLang (void);
795 FcDefaultFini (void);
800 FcFileIsLink (const FcChar8 *file);
803 FcFileScanConfig (FcFontSet *set,
810 FcDirScanConfig (FcFontSet *set,
824 FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
826 FcPrivate FcFontSet *
827 FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
831 FcHashGetSHA256Digest (const FcChar8 *input_strings,
835 FcHashGetSHA256DigestFromFile (const FcChar8 *filename);
838 FcHashGetSHA256DigestFromMemory (const char *fontdata,
843 FcInitLoadOwnConfig (FcConfig *config);
846 FcInitLoadOwnConfigAndFonts (FcConfig *config);
850 FcTestDestroy (FcTest *test);
853 FcEditDestroy (FcEdit *e);
856 FcRuleDestroy (FcRule *rule);
859 FcPrivate FcLangSet *
860 FcFreeTypeLangSet (const FcCharSet *charset,
861 const FcChar8 *exclusiveLang);
863 FcPrivate FcLangResult
864 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
866 FcPrivate FcLangSet *
867 FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *buf);
869 FcPrivate FcLangSet *
870 FcNameParseLangSet (const FcChar8 *string);
873 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
876 FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
881 FcListPatternMatchAny (const FcPattern *p,
882 const FcPattern *font);
889 FC_INVALID_OBJECT = 0,
890 #define FC_OBJECT(NAME, Type, Cmp) FC_##NAME##_OBJECT,
893 FC_ONE_AFTER_MAX_BASE_OBJECT
894 #define FC_MAX_BASE_OBJECT (FC_ONE_AFTER_MAX_BASE_OBJECT - 1)
898 FcNameBool (const FcChar8 *v, FcBool *result);
901 FcObjectValidType (FcObject object, FcType type);
904 FcObjectFromName (const char * name);
906 FcPrivate const char *
907 FcObjectName (FcObject object);
909 FcPrivate FcObjectSet *
910 FcObjectGetSet (void);
912 #define FcObjectCompare(a, b) ((int) a - (int) b)
917 FcValueCanonicalize (const FcValue *v);
919 FcPrivate FcValueListPtr
920 FcValueListCreate (void);
923 FcValueListDestroy (FcValueListPtr l);
925 FcPrivate FcValueListPtr
926 FcValueListPrepend (FcValueListPtr vallist,
928 FcValueBinding binding);
930 FcPrivate FcValueListPtr
931 FcValueListAppend (FcValueListPtr vallist,
933 FcValueBinding binding);
935 FcPrivate FcValueListPtr
936 FcValueListDuplicate(FcValueListPtr orig);
938 FcPrivate FcPatternElt *
939 FcPatternObjectFindElt (const FcPattern *p, FcObject object);
941 FcPrivate FcPatternElt *
942 FcPatternObjectInsertElt (FcPattern *p, FcObject object);
945 FcPatternObjectListAdd (FcPattern *p,
951 FcPatternObjectAddWithBinding (FcPattern *p,
954 FcValueBinding binding,
958 FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
961 FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
964 FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
967 FcPatternObjectDel (FcPattern *p, FcObject object);
970 FcPatternObjectRemove (FcPattern *p, FcObject object, int id);
973 FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i);
976 FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d);
979 FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s);
982 FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s);
985 FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c);
988 FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
991 FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
994 FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
997 FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d);
1000 FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s);
1003 FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s);
1006 FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c);
1009 FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
1012 FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
1015 FcPatternAppend (FcPattern *p, FcPattern *s);
1018 FcStringHash (const FcChar8 *s);
1021 FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat);
1023 FcPrivate FcPattern *
1024 FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat);
1027 FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat);
1029 FcPrivate FcValueList *
1030 FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat);
1036 extern FcPrivate const FcMatrix FcIdentityMatrix;
1039 FcMatrixFree (FcMatrix *mat);
1044 FcStat (const FcChar8 *file, struct stat *statb);
1047 FcStatChecksum (const FcChar8 *file, struct stat *statb);
1050 FcIsFsMmapSafe (int fd);
1053 FcIsFsMtimeBroken (const FcChar8 *dir);
1057 FcStrSetAddLangs (FcStrSet *strs, const char *languages);
1060 FcStrSetSort (FcStrSet * set);
1063 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
1066 FcStrBufDestroy (FcStrBuf *buf);
1069 FcStrBufDone (FcStrBuf *buf);
1072 FcStrBufDoneStatic (FcStrBuf *buf);
1075 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
1078 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
1081 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
1084 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1087 FcStrCmpIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1090 FcStrRegexCmp (const FcChar8 *s, const FcChar8 *regex);
1093 FcStrRegexCmpIgnoreCase (const FcChar8 *s, const FcChar8 *regex);
1095 FcPrivate const FcChar8 *
1096 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1098 FcPrivate const FcChar8 *
1099 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
1101 FcPrivate const FcChar8 *
1102 FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2);
1105 FcStrMatchIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1108 FcStrGlobMatch (const FcChar8 *glob,
1109 const FcChar8 *string);
1112 FcStrUsesHome (const FcChar8 *s);
1115 FcStrBuildFilename (const FcChar8 *path,
1119 FcStrLastSlash (const FcChar8 *path);
1122 FcStrHashIgnoreCase (const FcChar8 *s);
1125 FcStrCanonFilename (const FcChar8 *s);
1128 FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
1131 FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
1136 FcObjectLookupIdByName (const char *str);
1139 FcObjectLookupBuiltinIdByName (const char *str);
1141 FcPrivate const char *
1142 FcObjectLookupOtherNameById (FcObject id);
1144 FcPrivate const FcObjectType *
1145 FcObjectLookupOtherTypeById (FcObject id);
1147 FcPrivate const FcObjectType *
1148 FcObjectLookupOtherTypeByName (const char *str);
1150 #endif /* _FC_INT_H_ */