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
90 #define FC_DBG_MATCH2 4096
92 #define _FC_ASSERT_STATIC1(_line, _cond) typedef int _static_assert_on_line_##_line##_failed[(_cond)?1:-1] FC_UNUSED
93 #define _FC_ASSERT_STATIC0(_line, _cond) _FC_ASSERT_STATIC1 (_line, (_cond))
94 #define FC_ASSERT_STATIC(_cond) _FC_ASSERT_STATIC0 (__LINE__, (_cond))
96 #define FC_MIN(a,b) ((a) < (b) ? (a) : (b))
97 #define FC_MAX(a,b) ((a) > (b) ? (a) : (b))
98 #define FC_ABS(a) ((a) < 0 ? -(a) : (a))
100 /* slim_internal.h */
101 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun)
102 #define FcPrivate __attribute__((__visibility__("hidden")))
103 #define HAVE_GNUC_ATTRIBUTE 1
105 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
106 #define FcPrivate __hidden
107 #else /* not gcc >= 3.3 and not Sun Studio >= 8 */
111 FC_ASSERT_STATIC (sizeof (FcRef) == sizeof (int));
113 typedef enum _FcValueBinding {
114 FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame,
115 /* to make sure sizeof (FcValueBinding) == 4 even with -fshort-enums */
116 FcValueBindingEnd = INT_MAX
119 #define FcStrdup(s) ((FcChar8 *) strdup ((const char *) (s)))
120 #define FcFree(s) (free ((FcChar8 *) (s)))
123 * Serialized data structures use only offsets instead of pointers
124 * A low bit of 1 indicates an offset.
127 /* Is the provided pointer actually an offset? */
128 #define FcIsEncodedOffset(p) ((((intptr_t) (p)) & 1) != 0)
130 /* Encode offset in a pointer of type t */
131 #define FcOffsetEncode(o,t) ((t *) ((o) | 1))
133 /* Decode a pointer into an offset */
134 #define FcOffsetDecode(p) (((intptr_t) (p)) & ~1)
136 /* Compute pointer offset */
137 #define FcPtrToOffset(b,p) ((intptr_t) (p) - (intptr_t) (b))
139 /* Given base address, offset and type, return a pointer */
140 #define FcOffsetToPtr(b,o,t) ((t *) ((intptr_t) (b) + (o)))
142 /* Given base address, encoded offset and type, return a pointer */
143 #define FcEncodedOffsetToPtr(b,p,t) FcOffsetToPtr(b,FcOffsetDecode(p),t)
145 /* Given base address, pointer and type, return an encoded offset */
146 #define FcPtrToEncodedOffset(b,p,t) FcOffsetEncode(FcPtrToOffset(b,p),t)
148 /* Given a structure, offset member and type, return pointer */
149 #define FcOffsetMember(s,m,t) FcOffsetToPtr(s,(s)->m,t)
151 /* Given a structure, encoded offset member and type, return pointer to member */
152 #define FcEncodedOffsetMember(s,m,t) FcOffsetToPtr(s,FcOffsetDecode((s)->m), t)
154 /* Given a structure, member and type, convert the member to a pointer */
155 #define FcPointerMember(s,m,t) (FcIsEncodedOffset((s)->m) ? \
156 FcEncodedOffsetMember (s,m,t) : \
160 * Serialized values may hold strings, charsets and langsets as pointers,
161 * unfortunately FcValue is an exposed type so we can't just always use
164 #define FcValueString(v) FcPointerMember(v,u.s,FcChar8)
165 #define FcValueCharSet(v) FcPointerMember(v,u.c,const FcCharSet)
166 #define FcValueLangSet(v) FcPointerMember(v,u.l,const FcLangSet)
167 #define FcValueRange(v) FcPointerMember(v,u.r,const FcRange)
169 typedef struct _FcValueList *FcValueListPtr;
171 typedef struct _FcValueList {
172 struct _FcValueList *next;
174 FcValueBinding binding;
177 #define FcValueListNext(vl) FcPointerMember(vl,next,FcValueList)
179 typedef int FcObject;
181 /* The 1024 is to leave some room for future added internal objects, such
182 * that caches from newer fontconfig can still be used with older fontconfig
183 * without getting confused. */
184 #define FC_EXT_OBJ_INDEX 1024
185 #define FC_OBJ_ID(_n_) ((_n_) & (~FC_EXT_OBJ_INDEX))
187 typedef struct _FcPatternElt *FcPatternEltPtr;
190 * Pattern elts are stuck in a structure connected to the pattern,
191 * so they get moved around when the pattern is resized. Hence, the
192 * values field must be a pointer/offset instead of just an offset
194 typedef struct _FcPatternElt {
199 #define FcPatternEltValues(pe) FcPointerMember(pe,values,FcValueList)
204 intptr_t elts_offset;
208 #define FcPatternElts(p) FcOffsetMember(p,elts_offset,FcPatternElt)
210 #define FcFontSetFonts(fs) FcPointerMember(fs,fonts,FcPattern *)
212 #define FcFontSetFont(fs,i) (FcIsEncodedOffset((fs)->fonts) ? \
213 FcEncodedOffsetToPtr(fs, \
214 FcFontSetFonts(fs)[i], \
219 FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpRange, FcOpBool, FcOpCharSet, FcOpLangSet,
221 FcOpField, FcOpConst,
222 FcOpAssign, FcOpAssignReplace,
223 FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
224 FcOpDelete, FcOpDeleteAll,
226 FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
227 FcOpContains, FcOpListing, FcOpNotContains,
228 FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
229 FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
230 FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
234 typedef enum _FcOpFlags {
235 FcOpFlagIgnoreBlanks = 1 << 0
238 #define FC_OP_GET_OP(_x_) ((_x_) & 0xffff)
239 #define FC_OP_GET_FLAGS(_x_) (((_x_) & 0xffff0000) >> 16)
240 #define FC_OP(_x_,_f_) (FC_OP_GET_OP (_x_) | ((_f_) << 16))
242 typedef struct _FcExprMatrix {
243 struct _FcExpr *xx, *xy, *yx, *yy;
246 typedef struct _FcExprName {
257 typedef struct _FcExpr {
270 const FcChar8 *constant;
272 struct _FcExpr *left, *right;
277 typedef struct _FcExprPage FcExprPage;
280 FcExprPage *next_page;
282 FcExpr exprs[(1024 - 2/* two pointers */ - 2/* malloc overhead */) * sizeof (void *) / sizeof (FcExpr)];
283 FcExpr end[FLEXIBLE_ARRAY_MEMBER];
286 typedef enum _FcQual {
287 FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst
290 #define FcMatchDefault ((FcMatchKind) -1)
292 typedef struct _FcTest {
300 typedef struct _FcEdit {
304 FcValueBinding binding;
307 typedef enum _FcRuleType {
308 FcRuleUnknown, FcRuleTest, FcRuleEdit
311 typedef struct _FcRule {
312 struct _FcRule *next;
320 typedef struct _FcSubst {
321 struct _FcSubst *next;
325 typedef struct _FcCharLeaf {
326 FcChar32 map[256/32];
330 FcRef ref; /* reference count */
331 int num; /* size of leaves and numbers arrays */
332 intptr_t leaves_offset;
333 intptr_t numbers_offset;
336 #define FcCharSetLeaves(c) FcOffsetMember(c,leaves_offset,intptr_t)
337 #define FcCharSetLeaf(c,i) (FcOffsetToPtr(FcCharSetLeaves(c), \
338 FcCharSetLeaves(c)[i], \
340 #define FcCharSetNumbers(c) FcOffsetMember(c,numbers_offset,FcChar16)
342 #define FCSS_DEFAULT 0 /* default behavior */
343 #define FCSS_ALLOW_DUPLICATES 1 /* allows for duplicate strings in the set */
344 #define FCSS_GROW_BY_64 2 /* grows buffer by 64 elements instead of 1 */
346 #define FcStrSetHasControlBit(s,c) (s->control & c)
347 #define FcStrSetHasControlBits(s,c) ( (c) == (s->control & (c)) )
350 FcRef ref; /* reference count */
354 unsigned int control; /* control bits for set behavior */
362 typedef struct _FcStrBuf {
368 FcChar8 buf_static[16 * sizeof (void *)];
372 unsigned int magic; /* FC_CACHE_MAGIC_MMAP or FC_CACHE_ALLOC */
373 int version; /* FC_CACHE_VERSION_NUMBER */
374 intptr_t size; /* size of file */
375 intptr_t dir; /* offset to dir name */
376 intptr_t dirs; /* offset to subdirs */
377 int dirs_count; /* number of subdir strings */
378 intptr_t set; /* offset to font set */
379 int checksum; /* checksum of directory state */
380 int64_t checksum_nano; /* checksum of directory state */
385 #define FcCacheDir(c) FcOffsetMember(c,dir,FcChar8)
386 #define FcCacheDirs(c) FcOffsetMember(c,dirs,intptr_t)
387 #define FcCacheSet(c) FcOffsetMember(c,set,FcFontSet)
388 #define FcCacheSubdir(c,i) FcOffsetToPtr (FcCacheDirs(c),\
393 * Used while constructing a directory cache object
396 #define FC_SERIALIZE_HASH_SIZE 8191
398 typedef union _FcAlign {
406 typedef struct _FcSerializeBucket {
407 struct _FcSerializeBucket *next;
412 typedef struct _FcCharSetFreezer FcCharSetFreezer;
414 typedef struct _FcSerialize {
416 FcCharSetFreezer *cs_freezer;
418 FcSerializeBucket *buckets[FC_SERIALIZE_HASH_SIZE];
422 * To map adobe glyph names to unicode values, a precomputed hash
426 typedef struct _FcGlyphName {
427 FcChar32 ucs; /* unicode value */
428 FcChar8 name[1]; /* name extends beyond struct */
432 * To perform case-insensitive string comparisons, a table
433 * is used which holds three different kinds of folding data.
435 * The first is a range of upper case values mapping to a range
436 * of their lower case equivalents. Within each range, the offset
437 * between upper and lower case is constant.
439 * The second is a range of upper case values which are interleaved
440 * with their lower case equivalents.
442 * The third is a set of raw unicode values mapping to a list
443 * of unicode values for comparison purposes. This allows conversion
444 * of ß to "ss" so that SS, ss and ß all match. A separate array
445 * holds the list of unicode values for each entry.
447 * These are packed into a single table. Using a binary search,
448 * the appropriate entry can be located.
451 #define FC_CASE_FOLD_RANGE 0
452 #define FC_CASE_FOLD_EVEN_ODD 1
453 #define FC_CASE_FOLD_FULL 2
455 typedef struct _FcCaseFold {
459 short offset; /* lower - upper for RANGE, table id for FULL */
462 #define FC_MAX_FILE_LEN 4096
464 #define FC_CACHE_MAGIC_MMAP 0xFC02FC04
465 #define FC_CACHE_MAGIC_ALLOC 0xFC02FC05
468 FcChar8 *file; /* original file name */
469 FcChar8 *new; /* temp file name -- write data here */
470 FcChar8 *lck; /* lockfile name (used for locking) */
471 FcChar8 *tmp; /* tmpfile name (used for locking) */
482 * File names loaded from the configuration -- saved here as the
483 * cache file must be consulted before the directories are scanned,
484 * and those directives may occur in any order
486 FcStrSet *configDirs; /* directories to scan for fonts */
488 * Set of allowed blank chars -- used to
489 * trim fonts of bogus glyphs
493 * List of directories containing fonts,
494 * built by recursively scanning the set
495 * of configured directories
499 * List of directories containing cache files.
503 * Names of all of the configuration files used
504 * to create this configuration
506 FcStrSet *configFiles; /* config files loaded */
508 * Substitution instructions for patterns and fonts;
509 * maxObjects is used to allocate appropriate intermediate storage
510 * while performing a whole set of substitutions
512 FcSubst *substPattern; /* substitutions for patterns */
513 FcSubst *substFont; /* substitutions for fonts */
514 FcSubst *substScan; /* substitutions for scanned fonts */
515 int maxObjects; /* maximum number of tests in all substs */
517 * List of patterns used to control font file selection
519 FcStrSet *acceptGlobs;
520 FcStrSet *rejectGlobs;
521 FcFontSet *acceptPatterns;
522 FcFontSet *rejectPatterns;
524 * The set of fonts loaded from the listed directories; the
525 * order within the set does not determine the font selection,
526 * except in the case of identical matches in which case earlier fonts
527 * match preferrentially
529 FcFontSet *fonts[FcSetApplication + 1];
531 * Fontconfig can periodically rescan the system configuration
532 * and font directories. This rescanning occurs when font
533 * listing requests are made, but no more often than rescanInterval
536 time_t rescanTime; /* last time information was scanned */
537 int rescanInterval; /* interval between scans */
539 FcRef ref; /* reference count */
541 FcExprPage *expr_pool; /* pool of FcExpr's */
543 FcChar8 *sysRoot; /* override the system root directory */
546 typedef struct _FcFileTime {
551 typedef struct _FcCharMap FcCharMap;
553 typedef struct _FcStatFS FcStatFS;
557 FcBool is_mtime_broken;
560 typedef struct _FcValuePromotionBuffer FcValuePromotionBuffer;
562 struct _FcValuePromotionBuffer {
567 char c[256]; /* Enlarge as needed */
576 FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
579 FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
582 FcDirCacheRebuild (FcCache *cache, struct stat *dir_stat, FcStrSet *dirs);
585 FcDirCacheWrite (FcCache *cache, FcConfig *config);
588 FcDirCacheCreateTagFile (const FcChar8 *cache_dir);
591 FcCacheObjectReference (void *object);
594 FcCacheObjectDereference (void *object);
600 FcDirCacheReference (FcCache *cache, int nref);
603 FcDirCacheLock (const FcChar8 *dir,
607 FcDirCacheUnlock (int fd);
618 FcConfigXdgCacheHome (void);
621 FcConfigXdgConfigHome (void);
624 FcConfigXdgDataHome (void);
627 FcConfigAllocExpr (FcConfig *config);
630 FcConfigAddConfigDir (FcConfig *config,
634 FcConfigAddFontDir (FcConfig *config,
638 FcConfigAddDir (FcConfig *config,
642 FcConfigAddCacheDir (FcConfig *config,
646 FcConfigAddConfigFile (FcConfig *config,
650 FcConfigAddBlank (FcConfig *config,
654 FcConfigAddRule (FcConfig *config,
659 FcConfigSetFonts (FcConfig *config,
664 FcConfigCompareValue (const FcValue *m,
669 FcConfigGlobAdd (FcConfig *config,
674 FcConfigAcceptFilename (FcConfig *config,
675 const FcChar8 *filename);
678 FcConfigPatternsAdd (FcConfig *config,
683 FcConfigAcceptFont (FcConfig *config,
684 const FcPattern *font);
687 FcConfigModifiedTime (FcConfig *config);
690 FcConfigAddCache (FcConfig *config, FcCache *cache,
691 FcSetName set, FcStrSet *dirSet);
695 FcAlignSize (intptr_t size);
697 FcPrivate FcSerialize *
698 FcSerializeCreate (void);
701 FcSerializeDestroy (FcSerialize *serialize);
704 FcSerializeAlloc (FcSerialize *serialize, const void *object, int size);
707 FcSerializeReserve (FcSerialize *serialize, int size);
710 FcSerializeOffset (FcSerialize *serialize, const void *object);
713 FcSerializePtr (FcSerialize *serialize, const void *object);
716 FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l);
718 FcPrivate FcLangSet *
719 FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l);
722 FcPrivate FcCharSet *
723 FcCharSetPromote (FcValuePromotionBuffer *vbuf);
726 FcLangCharSetPopulate (void);
728 FcPrivate FcCharSetFreezer *
729 FcCharSetFreezerCreate (void);
731 FcPrivate const FcCharSet *
732 FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs);
735 FcCharSetFreezerDestroy (FcCharSetFreezer *freezer);
738 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
740 FcPrivate FcCharSet *
741 FcNameParseCharSet (FcChar8 *string);
744 FcNameUnparseValue (FcStrBuf *buf,
749 FcNameUnparseValueList (FcStrBuf *buf,
753 FcPrivate FcCharLeaf *
754 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
757 FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs);
759 FcPrivate FcCharSet *
760 FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
763 FcCharSetGetNumbers(const FcCharSet *c);
767 FcOpen(const char *pathname, int flags, ...);
770 FcMakeTempfile (char *template);
776 FcMakeDirectory (const FcChar8 *dir);
781 FcValuePrintFile (FILE *f, const FcValue v);
784 FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark);
787 FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos);
790 FcValueListPrint (FcValueListPtr l);
793 FcLangSetPrint (const FcLangSet *ls);
799 FcTestPrint (const FcTest *test);
802 FcExprPrint (const FcExpr *expr);
805 FcEditPrint (const FcEdit *edit);
808 FcSubstPrint (const FcSubst *subst);
811 FcCharSetPrint (const FcCharSet *c);
814 FcPatternPrint2 (FcPattern *p1, FcPattern *p2, const FcObjectSet *os);
816 extern FcPrivate int FcDebugVal;
818 #define FcDebug() (FcDebugVal)
825 FcGetDefaultLang (void);
831 FcDefaultFini (void);
836 FcFileIsLink (const FcChar8 *file);
839 FcFileIsFile (const FcChar8 *file);
842 FcFileScanConfig (FcFontSet *set,
849 FcDirScanConfig (FcFontSet *set,
863 FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
865 FcPrivate FcFontSet *
866 FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
868 FcPrivate FcFontSet *
869 FcFontSetDeserialize (const FcFontSet *set);
873 FcInitLoadOwnConfig (FcConfig *config);
876 FcInitLoadOwnConfigAndFonts (FcConfig *config);
880 FcConfigPathFini (void);
883 FcTestDestroy (FcTest *test);
886 FcEditDestroy (FcEdit *e);
889 FcRuleDestroy (FcRule *rule);
892 FcPrivate FcLangSet *
893 FcFreeTypeLangSet (const FcCharSet *charset,
894 const FcChar8 *exclusiveLang);
896 FcPrivate FcLangResult
897 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
899 FcPrivate FcLangSet *
900 FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *buf);
902 FcPrivate FcLangSet *
903 FcNameParseLangSet (const FcChar8 *string);
906 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
909 FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
914 FcListPatternMatchAny (const FcPattern *p,
915 const FcPattern *font);
922 FC_INVALID_OBJECT = 0,
923 #define FC_OBJECT(NAME, Type, Cmp) FC_##NAME##_OBJECT,
926 FC_ONE_AFTER_MAX_BASE_OBJECT
927 #define FC_MAX_BASE_OBJECT (FC_ONE_AFTER_MAX_BASE_OBJECT - 1)
931 FcNameBool (const FcChar8 *v, FcBool *result);
934 FcObjectValidType (FcObject object, FcType type);
937 FcObjectFromName (const char * name);
939 FcPrivate const char *
940 FcObjectName (FcObject object);
942 FcPrivate FcObjectSet *
943 FcObjectGetSet (void);
945 #define FcObjectCompare(a, b) ((int) a - (int) b)
950 FcValueCanonicalize (const FcValue *v);
952 FcPrivate FcValueListPtr
953 FcValueListCreate (void);
956 FcValueListDestroy (FcValueListPtr l);
958 FcPrivate FcValueListPtr
959 FcValueListPrepend (FcValueListPtr vallist,
961 FcValueBinding binding);
963 FcPrivate FcValueListPtr
964 FcValueListAppend (FcValueListPtr vallist,
966 FcValueBinding binding);
968 FcPrivate FcValueListPtr
969 FcValueListDuplicate(FcValueListPtr orig);
971 FcPrivate FcPatternElt *
972 FcPatternObjectFindElt (const FcPattern *p, FcObject object);
974 FcPrivate FcPatternElt *
975 FcPatternObjectInsertElt (FcPattern *p, FcObject object);
978 FcPatternObjectListAdd (FcPattern *p,
984 FcPatternObjectAddWithBinding (FcPattern *p,
987 FcValueBinding binding,
991 FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
994 FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
997 FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
1000 FcPatternObjectDel (FcPattern *p, FcObject object);
1003 FcPatternObjectRemove (FcPattern *p, FcObject object, int id);
1006 FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i);
1009 FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d);
1012 FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s);
1015 FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s);
1018 FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c);
1021 FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
1024 FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
1027 FcPatternObjectAddRange (FcPattern *p, FcObject object, const FcRange *r);
1030 FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
1033 FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d);
1036 FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s);
1039 FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s);
1042 FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c);
1045 FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
1048 FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
1051 FcPatternObjectGetRange (const FcPattern *p, FcObject object, int id, FcRange **r);
1054 FcPatternAppend (FcPattern *p, FcPattern *s);
1057 FcPatternPosition (const FcPattern *p, const char *object);
1060 FcStringHash (const FcChar8 *s);
1063 FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat);
1065 FcPrivate FcPattern *
1066 FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat);
1069 FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat);
1071 FcPrivate FcValueList *
1072 FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat);
1078 extern FcPrivate const FcMatrix FcIdentityMatrix;
1081 FcMatrixFree (FcMatrix *mat);
1086 FcRangePromote (double v, FcValuePromotionBuffer *vbuf);
1089 FcRangeIsInRange (const FcRange *a, const FcRange *b);
1092 FcRangeCompare (FcOp op, const FcRange *a, const FcRange *b);
1095 FcRangeHash (const FcRange *r);
1098 FcRangeSerializeAlloc (FcSerialize *serialize, const FcRange *r);
1101 FcRangeSerialize (FcSerialize *serialize, const FcRange *r);
1106 FcStat (const FcChar8 *file, struct stat *statb);
1109 FcStatChecksum (const FcChar8 *file, struct stat *statb);
1112 FcIsFsMmapSafe (int fd);
1115 FcIsFsMtimeBroken (const FcChar8 *dir);
1118 FcPrivate FcStrSet *
1119 FcStrSetCreateEx (unsigned int control);
1122 FcStrSetAddLangs (FcStrSet *strs, const char *languages);
1125 FcStrSetSort (FcStrSet * set);
1128 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
1131 FcStrBufDestroy (FcStrBuf *buf);
1134 FcStrBufDone (FcStrBuf *buf);
1137 FcStrBufDoneStatic (FcStrBuf *buf);
1140 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
1143 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
1146 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
1149 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1152 FcStrCmpIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1154 FcPrivate const FcChar8 *
1155 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1157 FcPrivate const FcChar8 *
1158 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
1160 FcPrivate const FcChar8 *
1161 FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2);
1164 FcStrMatchIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1167 FcStrGlobMatch (const FcChar8 *glob,
1168 const FcChar8 *string);
1171 FcStrUsesHome (const FcChar8 *s);
1174 FcStrBuildFilename (const FcChar8 *path,
1178 FcStrLastSlash (const FcChar8 *path);
1181 FcStrHashIgnoreCase (const FcChar8 *s);
1184 FcStrCanonFilename (const FcChar8 *s);
1187 FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
1190 FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
1195 FcObjectFini (void);
1198 FcObjectLookupIdByName (const char *str);
1201 FcObjectLookupBuiltinIdByName (const char *str);
1203 FcPrivate const char *
1204 FcObjectLookupOtherNameById (FcObject id);
1206 FcPrivate const FcObjectType *
1207 FcObjectLookupOtherTypeById (FcObject id);
1209 FcPrivate const FcObjectType *
1210 FcObjectLookupOtherTypeByName (const char *str);
1212 #endif /* _FC_INT_H_ */