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.
45 #include <sys/types.h>
48 #include <fontconfig/fontconfig.h>
49 #include <fontconfig/fcprivate.h>
50 #include "fcdeprecate.h"
54 #ifndef FC_CONFIG_PATH
55 #define FC_CONFIG_PATH "fonts.conf"
59 # include "fcwindows.h"
60 typedef UINT (WINAPI *pfnGetSystemWindowsDirectory)(LPSTR, UINT);
61 typedef HRESULT (WINAPI *pfnSHGetFolderPathA)(HWND, int, HANDLE, DWORD, LPSTR);
62 extern pfnGetSystemWindowsDirectory pGetSystemWindowsDirectory;
63 extern pfnSHGetFolderPathA pSHGetFolderPathA;
64 # define FC_SEARCH_PATH_SEPARATOR ';'
65 # define FC_DIR_SEPARATOR '\\'
66 # define FC_DIR_SEPARATOR_S "\\"
68 # define FC_SEARCH_PATH_SEPARATOR ':'
69 # define FC_DIR_SEPARATOR '/'
70 # define FC_DIR_SEPARATOR_S "/"
74 #define FC_UNUSED __attribute__((unused))
79 #define FC_DBG_MATCH 1
80 #define FC_DBG_MATCHV 2
82 #define FC_DBG_FONTSET 8
83 #define FC_DBG_CACHE 16
84 #define FC_DBG_CACHEV 32
85 #define FC_DBG_PARSE 64
86 #define FC_DBG_SCAN 128
87 #define FC_DBG_SCANV 256
88 #define FC_DBG_CONFIG 1024
89 #define FC_DBG_LANGSET 2048
91 #define _FC_ASSERT_STATIC1(_line, _cond) typedef int _static_assert_on_line_##_line##_failed[(_cond)?1:-1] FC_UNUSED
92 #define _FC_ASSERT_STATIC0(_line, _cond) _FC_ASSERT_STATIC1 (_line, (_cond))
93 #define FC_ASSERT_STATIC(_cond) _FC_ASSERT_STATIC0 (__LINE__, (_cond))
95 #define FC_MIN(a,b) ((a) < (b) ? (a) : (b))
96 #define FC_MAX(a,b) ((a) > (b) ? (a) : (b))
97 #define FC_ABS(a) ((a) < 0 ? -(a) : (a))
99 #define FcDoubleIsZero(a) (fabs ((a)) <= DBL_EPSILON)
100 #define FcDoubleCmpEQ(a,b) (fabs ((a) - (b)) <= DBL_EPSILON)
101 #define FcDoubleCmpGE(a,b) (FcDoubleCmpEQ (a, b) || (a) > (b))
102 #define FcDoubleCmpLE(a,b) (FcDoubleCmpEQ (a, b) || (a) < (b))
104 /* slim_internal.h */
105 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun)
106 #define FcPrivate __attribute__((__visibility__("hidden")))
107 #define HAVE_GNUC_ATTRIBUTE 1
109 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
110 #define FcPrivate __hidden
111 #else /* not gcc >= 3.3 and not Sun Studio >= 8 */
115 FC_ASSERT_STATIC (sizeof (FcRef) == sizeof (int));
117 typedef enum _FcValueBinding {
118 FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame,
119 /* to make sure sizeof (FcValueBinding) == 4 even with -fshort-enums */
120 FcValueBindingEnd = INT_MAX
123 #define FcStrdup(s) ((FcChar8 *) strdup ((const char *) (s)))
124 #define FcFree(s) (free ((FcChar8 *) (s)))
127 * Serialized data structures use only offsets instead of pointers
128 * A low bit of 1 indicates an offset.
131 /* Is the provided pointer actually an offset? */
132 #define FcIsEncodedOffset(p) ((((intptr_t) (p)) & 1) != 0)
134 /* Encode offset in a pointer of type t */
135 #define FcOffsetEncode(o,t) ((t *) ((o) | 1))
137 /* Decode a pointer into an offset */
138 #define FcOffsetDecode(p) (((intptr_t) (p)) & ~1)
140 /* Compute pointer offset */
141 #define FcPtrToOffset(b,p) ((intptr_t) (p) - (intptr_t) (b))
143 /* Given base address, offset and type, return a pointer */
144 #define FcOffsetToPtr(b,o,t) ((t *) ((intptr_t) (b) + (o)))
146 /* Given base address, encoded offset and type, return a pointer */
147 #define FcEncodedOffsetToPtr(b,p,t) FcOffsetToPtr(b,FcOffsetDecode(p),t)
149 /* Given base address, pointer and type, return an encoded offset */
150 #define FcPtrToEncodedOffset(b,p,t) FcOffsetEncode(FcPtrToOffset(b,p),t)
152 /* Given a structure, offset member and type, return pointer */
153 #define FcOffsetMember(s,m,t) FcOffsetToPtr(s,(s)->m,t)
155 /* Given a structure, encoded offset member and type, return pointer to member */
156 #define FcEncodedOffsetMember(s,m,t) FcOffsetToPtr(s,FcOffsetDecode((s)->m), t)
158 /* Given a structure, member and type, convert the member to a pointer */
159 #define FcPointerMember(s,m,t) (FcIsEncodedOffset((s)->m) ? \
160 FcEncodedOffsetMember (s,m,t) : \
164 * Serialized values may hold strings, charsets and langsets as pointers,
165 * unfortunately FcValue is an exposed type so we can't just always use
168 #define FcValueString(v) FcPointerMember(v,u.s,FcChar8)
169 #define FcValueCharSet(v) FcPointerMember(v,u.c,const FcCharSet)
170 #define FcValueLangSet(v) FcPointerMember(v,u.l,const FcLangSet)
171 #define FcValueRange(v) FcPointerMember(v,u.r,const FcRange)
173 typedef struct _FcValueList *FcValueListPtr;
175 typedef struct _FcValueList {
176 struct _FcValueList *next;
178 FcValueBinding binding;
181 #define FcValueListNext(vl) FcPointerMember(vl,next,FcValueList)
183 typedef int FcObject;
185 /* The 1024 is to leave some room for future added internal objects, such
186 * that caches from newer fontconfig can still be used with older fontconfig
187 * without getting confused. */
188 #define FC_EXT_OBJ_INDEX 1024
189 #define FC_OBJ_ID(_n_) ((_n_) & (~FC_EXT_OBJ_INDEX))
191 typedef struct _FcPatternElt *FcPatternEltPtr;
194 * Pattern elts are stuck in a structure connected to the pattern,
195 * so they get moved around when the pattern is resized. Hence, the
196 * values field must be a pointer/offset instead of just an offset
198 typedef struct _FcPatternElt {
203 #define FcPatternEltValues(pe) FcPointerMember(pe,values,FcValueList)
208 intptr_t elts_offset;
212 #define FcPatternElts(p) FcOffsetMember(p,elts_offset,FcPatternElt)
214 #define FcFontSetFonts(fs) FcPointerMember(fs,fonts,FcPattern *)
216 #define FcFontSetFont(fs,i) (FcIsEncodedOffset((fs)->fonts) ? \
217 FcEncodedOffsetToPtr(fs, \
218 FcFontSetFonts(fs)[i], \
223 FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpRange, FcOpBool, FcOpCharSet, FcOpLangSet,
225 FcOpField, FcOpConst,
226 FcOpAssign, FcOpAssignReplace,
227 FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
228 FcOpDelete, FcOpDeleteAll,
230 FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
231 FcOpContains, FcOpListing, FcOpNotContains,
232 FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
233 FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
234 FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
238 typedef enum _FcOpFlags {
239 FcOpFlagIgnoreBlanks = 1 << 0
242 #define FC_OP_GET_OP(_x_) ((_x_) & 0xffff)
243 #define FC_OP_GET_FLAGS(_x_) (((_x_) & 0xffff0000) >> 16)
244 #define FC_OP(_x_,_f_) (FC_OP_GET_OP (_x_) | ((_f_) << 16))
246 typedef struct _FcExprMatrix {
247 struct _FcExpr *xx, *xy, *yx, *yy;
250 typedef struct _FcExprName {
255 typedef struct _FcRangeInt {
259 typedef struct _FcRangeDouble {
273 typedef struct _FcExpr {
286 const FcChar8 *constant;
288 struct _FcExpr *left, *right;
293 typedef struct _FcExprPage FcExprPage;
296 FcExprPage *next_page;
298 FcExpr exprs[(1024 - 2/* two pointers */ - 2/* malloc overhead */) * sizeof (void *) / sizeof (FcExpr)];
299 FcExpr end[FLEXIBLE_ARRAY_MEMBER];
302 typedef enum _FcQual {
303 FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst
306 #define FcMatchDefault ((FcMatchKind) -1)
308 typedef struct _FcTest {
316 typedef struct _FcEdit {
320 FcValueBinding binding;
323 typedef enum _FcRuleType {
324 FcRuleUnknown, FcRuleTest, FcRuleEdit
327 typedef struct _FcRule {
328 struct _FcRule *next;
336 typedef struct _FcSubst {
337 struct _FcSubst *next;
341 typedef struct _FcCharLeaf {
342 FcChar32 map[256/32];
346 FcRef ref; /* reference count */
347 int num; /* size of leaves and numbers arrays */
348 intptr_t leaves_offset;
349 intptr_t numbers_offset;
352 #define FcCharSetLeaves(c) FcOffsetMember(c,leaves_offset,intptr_t)
353 #define FcCharSetLeaf(c,i) (FcOffsetToPtr(FcCharSetLeaves(c), \
354 FcCharSetLeaves(c)[i], \
356 #define FcCharSetNumbers(c) FcOffsetMember(c,numbers_offset,FcChar16)
359 FcRef ref; /* reference count */
370 typedef struct _FcStrBuf {
376 FcChar8 buf_static[16 * sizeof (void *)];
380 unsigned int magic; /* FC_CACHE_MAGIC_MMAP or FC_CACHE_ALLOC */
381 int version; /* FC_CACHE_CONTENT_VERSION */
382 intptr_t size; /* size of file */
383 intptr_t dir; /* offset to dir name */
384 intptr_t dirs; /* offset to subdirs */
385 int dirs_count; /* number of subdir strings */
386 intptr_t set; /* offset to font set */
387 int checksum; /* checksum of directory state */
392 #define FcCacheDir(c) FcOffsetMember(c,dir,FcChar8)
393 #define FcCacheDirs(c) FcOffsetMember(c,dirs,intptr_t)
394 #define FcCacheSet(c) FcOffsetMember(c,set,FcFontSet)
395 #define FcCacheSubdir(c,i) FcOffsetToPtr (FcCacheDirs(c),\
400 * Used while constructing a directory cache object
403 #define FC_SERIALIZE_HASH_SIZE 8191
405 typedef union _FcAlign {
413 typedef struct _FcSerializeBucket {
414 struct _FcSerializeBucket *next;
419 typedef struct _FcCharSetFreezer FcCharSetFreezer;
421 typedef struct _FcSerialize {
423 FcCharSetFreezer *cs_freezer;
425 FcSerializeBucket *buckets[FC_SERIALIZE_HASH_SIZE];
429 * To map adobe glyph names to unicode values, a precomputed hash
433 typedef struct _FcGlyphName {
434 FcChar32 ucs; /* unicode value */
435 FcChar8 name[1]; /* name extends beyond struct */
439 * To perform case-insensitive string comparisons, a table
440 * is used which holds three different kinds of folding data.
442 * The first is a range of upper case values mapping to a range
443 * of their lower case equivalents. Within each range, the offset
444 * between upper and lower case is constant.
446 * The second is a range of upper case values which are interleaved
447 * with their lower case equivalents.
449 * The third is a set of raw unicode values mapping to a list
450 * of unicode values for comparison purposes. This allows conversion
451 * of ß to "ss" so that SS, ss and ß all match. A separate array
452 * holds the list of unicode values for each entry.
454 * These are packed into a single table. Using a binary search,
455 * the appropriate entry can be located.
458 #define FC_CASE_FOLD_RANGE 0
459 #define FC_CASE_FOLD_EVEN_ODD 1
460 #define FC_CASE_FOLD_FULL 2
462 typedef struct _FcCaseFold {
466 short offset; /* lower - upper for RANGE, table id for FULL */
469 #define FC_MAX_FILE_LEN 4096
471 #define FC_CACHE_MAGIC_MMAP 0xFC02FC04
472 #define FC_CACHE_MAGIC_ALLOC 0xFC02FC05
473 #define FC_CACHE_CONTENT_VERSION 5
476 FcChar8 *file; /* original file name */
477 FcChar8 *new; /* temp file name -- write data here */
478 FcChar8 *lck; /* lockfile name (used for locking) */
479 FcChar8 *tmp; /* tmpfile name (used for locking) */
490 * File names loaded from the configuration -- saved here as the
491 * cache file must be consulted before the directories are scanned,
492 * and those directives may occur in any order
494 FcStrSet *configDirs; /* directories to scan for fonts */
496 * Set of allowed blank chars -- used to
497 * trim fonts of bogus glyphs
501 * List of directories containing fonts,
502 * built by recursively scanning the set
503 * of configured directories
507 * List of directories containing cache files.
511 * Names of all of the configuration files used
512 * to create this configuration
514 FcStrSet *configFiles; /* config files loaded */
516 * Substitution instructions for patterns and fonts;
517 * maxObjects is used to allocate appropriate intermediate storage
518 * while performing a whole set of substitutions
520 FcSubst *substPattern; /* substitutions for patterns */
521 FcSubst *substFont; /* substitutions for fonts */
522 FcSubst *substScan; /* substitutions for scanned fonts */
523 int maxObjects; /* maximum number of tests in all substs */
525 * List of patterns used to control font file selection
527 FcStrSet *acceptGlobs;
528 FcStrSet *rejectGlobs;
529 FcFontSet *acceptPatterns;
530 FcFontSet *rejectPatterns;
532 * The set of fonts loaded from the listed directories; the
533 * order within the set does not determine the font selection,
534 * except in the case of identical matches in which case earlier fonts
535 * match preferrentially
537 FcFontSet *fonts[FcSetApplication + 1];
539 * Fontconfig can periodically rescan the system configuration
540 * and font directories. This rescanning occurs when font
541 * listing requests are made, but no more often than rescanInterval
544 time_t rescanTime; /* last time information was scanned */
545 int rescanInterval; /* interval between scans */
547 FcRef ref; /* reference count */
549 FcExprPage *expr_pool; /* pool of FcExpr's */
551 FcChar8 *sysRoot; /* override the system root directory */
554 typedef struct _FcFileTime {
559 typedef struct _FcCharMap FcCharMap;
561 typedef struct _FcStatFS FcStatFS;
565 FcBool is_mtime_broken;
568 typedef struct _FcValuePromotionBuffer FcValuePromotionBuffer;
570 struct _FcValuePromotionBuffer {
575 char c[256]; /* Enlarge as needed */
584 FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
587 FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
590 FcDirCacheRebuild (FcCache *cache, struct stat *dir_stat, FcStrSet *dirs);
593 FcDirCacheWrite (FcCache *cache, FcConfig *config);
596 FcDirCacheCreateTagFile (const FcChar8 *cache_dir);
599 FcCacheObjectReference (void *object);
602 FcCacheObjectDereference (void *object);
608 FcDirCacheReference (FcCache *cache, int nref);
619 FcConfigXdgCacheHome (void);
622 FcConfigXdgConfigHome (void);
625 FcConfigXdgDataHome (void);
628 FcConfigAllocExpr (FcConfig *config);
631 FcConfigAddConfigDir (FcConfig *config,
635 FcConfigAddFontDir (FcConfig *config,
639 FcConfigAddDir (FcConfig *config,
643 FcConfigAddCacheDir (FcConfig *config,
647 FcConfigAddConfigFile (FcConfig *config,
651 FcConfigAddBlank (FcConfig *config,
655 FcConfigAddRule (FcConfig *config,
660 FcConfigSetFonts (FcConfig *config,
665 FcConfigCompareValue (const FcValue *m,
670 FcConfigGlobAdd (FcConfig *config,
675 FcConfigAcceptFilename (FcConfig *config,
676 const FcChar8 *filename);
679 FcConfigPatternsAdd (FcConfig *config,
684 FcConfigAcceptFont (FcConfig *config,
685 const FcPattern *font);
688 FcConfigModifiedTime (FcConfig *config);
691 FcConfigAddCache (FcConfig *config, FcCache *cache,
692 FcSetName set, FcStrSet *dirSet);
696 FcAlignSize (intptr_t size);
698 FcPrivate FcSerialize *
699 FcSerializeCreate (void);
702 FcSerializeDestroy (FcSerialize *serialize);
705 FcSerializeAlloc (FcSerialize *serialize, const void *object, int size);
708 FcSerializeReserve (FcSerialize *serialize, int size);
711 FcSerializeOffset (FcSerialize *serialize, const void *object);
714 FcSerializePtr (FcSerialize *serialize, const void *object);
717 FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l);
719 FcPrivate FcLangSet *
720 FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l);
723 FcPrivate FcCharSet *
724 FcCharSetPromote (FcValuePromotionBuffer *vbuf);
727 FcLangCharSetPopulate (void);
729 FcPrivate FcCharSetFreezer *
730 FcCharSetFreezerCreate (void);
732 FcPrivate const FcCharSet *
733 FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs);
736 FcCharSetFreezerDestroy (FcCharSetFreezer *freezer);
739 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
741 FcPrivate FcCharSet *
742 FcNameParseCharSet (FcChar8 *string);
745 FcNameUnparseValue (FcStrBuf *buf,
750 FcNameUnparseValueList (FcStrBuf *buf,
754 FcPrivate FcCharLeaf *
755 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
758 FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs);
760 FcPrivate FcCharSet *
761 FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
764 FcCharSetGetNumbers(const FcCharSet *c);
768 FcOpen(const char *pathname, int flags, ...);
771 FcMakeTempfile (char *template);
777 FcMakeDirectory (const FcChar8 *dir);
782 FcValuePrintFile (FILE *f, const FcValue v);
785 FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark);
788 FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos);
791 FcValueListPrint (FcValueListPtr l);
794 FcLangSetPrint (const FcLangSet *ls);
800 FcTestPrint (const FcTest *test);
803 FcExprPrint (const FcExpr *expr);
806 FcEditPrint (const FcEdit *edit);
809 FcSubstPrint (const FcSubst *subst);
812 FcCharSetPrint (const FcCharSet *c);
814 extern FcPrivate int FcDebugVal;
816 #define FcDebug() (FcDebugVal)
823 FcGetDefaultLang (void);
829 FcDefaultFini (void);
834 FcFileIsLink (const FcChar8 *file);
837 FcFileIsFile (const FcChar8 *file);
840 FcFileScanConfig (FcFontSet *set,
847 FcDirScanConfig (FcFontSet *set,
856 FcDirScanOnly (FcStrSet *dirs,
867 FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
869 FcPrivate FcFontSet *
870 FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
872 FcPrivate FcFontSet *
873 FcFontSetDeserialize (const FcFontSet *set);
877 FcInitLoadOwnConfig (FcConfig *config);
880 FcInitLoadOwnConfigAndFonts (FcConfig *config);
884 FcTestDestroy (FcTest *test);
887 FcEditDestroy (FcEdit *e);
890 FcRuleDestroy (FcRule *rule);
893 FcPrivate FcLangSet *
894 FcFreeTypeLangSet (const FcCharSet *charset,
895 const FcChar8 *exclusiveLang);
897 FcPrivate FcLangResult
898 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
900 FcPrivate FcLangSet *
901 FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *buf);
903 FcPrivate FcLangSet *
904 FcNameParseLangSet (const FcChar8 *string);
907 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
910 FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
915 FcListPatternMatchAny (const FcPattern *p,
916 const FcPattern *font);
923 FC_INVALID_OBJECT = 0,
924 #define FC_OBJECT(NAME, Type, Cmp) FC_##NAME##_OBJECT,
927 FC_ONE_AFTER_MAX_BASE_OBJECT
928 #define FC_MAX_BASE_OBJECT (FC_ONE_AFTER_MAX_BASE_OBJECT - 1)
932 FcNameBool (const FcChar8 *v, FcBool *result);
935 FcObjectValidType (FcObject object, FcType type);
938 FcObjectFromName (const char * name);
940 FcPrivate const char *
941 FcObjectName (FcObject object);
943 FcPrivate FcObjectSet *
944 FcObjectGetSet (void);
946 #define FcObjectCompare(a, b) ((int) a - (int) b)
951 FcValueCanonicalize (const FcValue *v);
953 FcPrivate FcValueListPtr
954 FcValueListCreate (void);
957 FcValueListDestroy (FcValueListPtr l);
959 FcPrivate FcValueListPtr
960 FcValueListPrepend (FcValueListPtr vallist,
962 FcValueBinding binding);
964 FcPrivate FcValueListPtr
965 FcValueListAppend (FcValueListPtr vallist,
967 FcValueBinding binding);
969 FcPrivate FcValueListPtr
970 FcValueListDuplicate(FcValueListPtr orig);
972 FcPrivate FcPatternElt *
973 FcPatternObjectFindElt (const FcPattern *p, FcObject object);
975 FcPrivate FcPatternElt *
976 FcPatternObjectInsertElt (FcPattern *p, FcObject object);
979 FcPatternObjectListAdd (FcPattern *p,
985 FcPatternObjectAddWithBinding (FcPattern *p,
988 FcValueBinding binding,
992 FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
995 FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
998 FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
1001 FcPatternObjectDel (FcPattern *p, FcObject object);
1004 FcPatternObjectRemove (FcPattern *p, FcObject object, int id);
1007 FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i);
1010 FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d);
1013 FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s);
1016 FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s);
1019 FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c);
1022 FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
1025 FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
1028 FcPatternObjectAddRange (FcPattern *p, FcObject object, const FcRange *r);
1031 FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
1034 FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d);
1037 FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s);
1040 FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s);
1043 FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c);
1046 FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
1049 FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
1052 FcPatternObjectGetRange (const FcPattern *p, FcObject object, int id, FcRange **r);
1055 FcPatternAppend (FcPattern *p, FcPattern *s);
1058 FcStringHash (const FcChar8 *s);
1061 FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat);
1063 FcPrivate FcPattern *
1064 FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat);
1067 FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat);
1069 FcPrivate FcValueList *
1070 FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat);
1076 extern FcPrivate const FcMatrix FcIdentityMatrix;
1079 FcMatrixFree (FcMatrix *mat);
1084 FcRangeCanonicalize (const FcRange *range);
1087 FcRangePromote (double v, FcValuePromotionBuffer *vbuf);
1090 FcRangeIsZero (const FcRange *r);
1093 FcRangeIsInRange (const FcRange *a, const FcRange *b);
1096 FcRangeCompare (FcOp op, const FcRange *a, const FcRange *b);
1099 FcRangeHash (const FcRange *r);
1102 FcRangeSerializeAlloc (FcSerialize *serialize, const FcRange *r);
1105 FcRangeSerialize (FcSerialize *serialize, const FcRange *r);
1110 FcStat (const FcChar8 *file, struct stat *statb);
1113 FcStatChecksum (const FcChar8 *file, struct stat *statb);
1116 FcIsFsMmapSafe (int fd);
1119 FcIsFsMtimeBroken (const FcChar8 *dir);
1123 FcStrSetAddLangs (FcStrSet *strs, const char *languages);
1126 FcStrSetSort (FcStrSet * set);
1129 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
1132 FcStrBufDestroy (FcStrBuf *buf);
1135 FcStrBufDone (FcStrBuf *buf);
1138 FcStrBufDoneStatic (FcStrBuf *buf);
1141 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
1144 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
1147 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
1150 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1153 FcStrCmpIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1155 FcPrivate const FcChar8 *
1156 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1158 FcPrivate const FcChar8 *
1159 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
1161 FcPrivate const FcChar8 *
1162 FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2);
1165 FcStrMatchIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1168 FcStrGlobMatch (const FcChar8 *glob,
1169 const FcChar8 *string);
1172 FcStrUsesHome (const FcChar8 *s);
1175 FcStrBuildFilename (const FcChar8 *path,
1179 FcStrLastSlash (const FcChar8 *path);
1182 FcStrHashIgnoreCase (const FcChar8 *s);
1185 FcStrCanonFilename (const FcChar8 *s);
1188 FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
1191 FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
1196 FcObjectLookupIdByName (const char *str);
1199 FcObjectLookupBuiltinIdByName (const char *str);
1201 FcPrivate const char *
1202 FcObjectLookupOtherNameById (FcObject id);
1204 FcPrivate const FcObjectType *
1205 FcObjectLookupOtherTypeById (FcObject id);
1207 FcPrivate const FcObjectType *
1208 FcObjectLookupOtherTypeByName (const char *str);
1210 #endif /* _FC_INT_H_ */