2 * fontconfig/src/fcint.h
4 * Copyright © 2000 Keith Packard
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of the author(s) not be used in
11 * advertising or publicity pertaining to distribution of the software without
12 * specific, written prior permission. The authors make no
13 * representations about the suitability of this software for any purpose. It
14 * is provided "as is" without express or implied warranty.
16 * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 * PERFORMANCE OF THIS SOFTWARE.
42 #include <sys/types.h>
45 #include <fontconfig/fontconfig.h>
46 #include <fontconfig/fcprivate.h>
47 #include "fcdeprecate.h"
51 #ifndef FC_CONFIG_PATH
52 #define FC_CONFIG_PATH "fonts.conf"
57 # define _WIN32_WINNT 0x0500
59 # define WIN32_LEAN_AND_MEAN
62 typedef UINT (WINAPI *pfnGetSystemWindowsDirectory)(LPSTR, UINT);
63 typedef HRESULT (WINAPI *pfnSHGetFolderPathA)(HWND, int, HANDLE, DWORD, LPSTR);
64 extern pfnGetSystemWindowsDirectory pGetSystemWindowsDirectory;
65 extern pfnSHGetFolderPathA pSHGetFolderPathA;
66 # define FC_SEARCH_PATH_SEPARATOR ';'
67 # define FC_DIR_SEPARATOR '\\'
68 # define FC_DIR_SEPARATOR_S "\\"
70 # define FC_SEARCH_PATH_SEPARATOR ':'
71 # define FC_DIR_SEPARATOR '/'
72 # define FC_DIR_SEPARATOR_S "/"
76 #define FC_UNUSED __attribute__((unused))
81 #define FC_DBG_MATCH 1
82 #define FC_DBG_MATCHV 2
84 #define FC_DBG_FONTSET 8
85 #define FC_DBG_CACHE 16
86 #define FC_DBG_CACHEV 32
87 #define FC_DBG_PARSE 64
88 #define FC_DBG_SCAN 128
89 #define FC_DBG_SCANV 256
90 #define FC_DBG_CONFIG 1024
91 #define FC_DBG_LANGSET 2048
93 #define _FC_ASSERT_STATIC1(_line, _cond) typedef int _static_assert_on_line_##_line##_failed[(_cond)?1:-1]
94 #define _FC_ASSERT_STATIC0(_line, _cond) _FC_ASSERT_STATIC1 (_line, (_cond))
95 #define FC_ASSERT_STATIC(_cond) _FC_ASSERT_STATIC0 (__LINE__, (_cond))
97 #define FC_MIN(a,b) ((a) < (b) ? (a) : (b))
98 #define FC_MAX(a,b) ((a) > (b) ? (a) : (b))
99 #define FC_ABS(a) ((a) < 0 ? -(a) : (a))
101 /* slim_internal.h */
102 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun)
103 #define FcPrivate __attribute__((__visibility__("hidden")))
104 #define HAVE_GNUC_ATTRIBUTE 1
106 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
107 #define FcPrivate __hidden
108 #else /* not gcc >= 3.3 and not Sun Studio >= 8 */
112 FC_ASSERT_STATIC (sizeof (FcRef) == sizeof (int));
114 typedef enum _FcValueBinding {
115 FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame
118 #define FcStrdup(s) ((FcChar8 *) strdup ((const char *) (s)))
119 #define FcFree(s) (free ((FcChar8 *) (s)))
122 * Serialized data structures use only offsets instead of pointers
123 * A low bit of 1 indicates an offset.
126 /* Is the provided pointer actually an offset? */
127 #define FcIsEncodedOffset(p) ((((intptr_t) (p)) & 1) != 0)
129 /* Encode offset in a pointer of type t */
130 #define FcOffsetEncode(o,t) ((t *) ((o) | 1))
132 /* Decode a pointer into an offset */
133 #define FcOffsetDecode(p) (((intptr_t) (p)) & ~1)
135 /* Compute pointer offset */
136 #define FcPtrToOffset(b,p) ((intptr_t) (p) - (intptr_t) (b))
138 /* Given base address, offset and type, return a pointer */
139 #define FcOffsetToPtr(b,o,t) ((t *) ((intptr_t) (b) + (o)))
141 /* Given base address, encoded offset and type, return a pointer */
142 #define FcEncodedOffsetToPtr(b,p,t) FcOffsetToPtr(b,FcOffsetDecode(p),t)
144 /* Given base address, pointer and type, return an encoded offset */
145 #define FcPtrToEncodedOffset(b,p,t) FcOffsetEncode(FcPtrToOffset(b,p),t)
147 /* Given a structure, offset member and type, return pointer */
148 #define FcOffsetMember(s,m,t) FcOffsetToPtr(s,(s)->m,t)
150 /* Given a structure, encoded offset member and type, return pointer to member */
151 #define FcEncodedOffsetMember(s,m,t) FcOffsetToPtr(s,FcOffsetDecode((s)->m), t)
153 /* Given a structure, member and type, convert the member to a pointer */
154 #define FcPointerMember(s,m,t) (FcIsEncodedOffset((s)->m) ? \
155 FcEncodedOffsetMember (s,m,t) : \
159 * Serialized values may hold strings, charsets and langsets as pointers,
160 * unfortunately FcValue is an exposed type so we can't just always use
163 #define FcValueString(v) FcPointerMember(v,u.s,FcChar8)
164 #define FcValueCharSet(v) FcPointerMember(v,u.c,const FcCharSet)
165 #define FcValueLangSet(v) FcPointerMember(v,u.l,const FcLangSet)
167 typedef struct _FcValueList *FcValueListPtr;
169 typedef struct _FcValueList {
170 struct _FcValueList *next;
172 FcValueBinding binding;
175 #define FcValueListNext(vl) FcPointerMember(vl,next,FcValueList)
177 typedef int FcObject;
179 typedef struct _FcPatternElt *FcPatternEltPtr;
182 * Pattern elts are stuck in a structure connected to the pattern,
183 * so they get moved around when the pattern is resized. Hence, the
184 * values field must be a pointer/offset instead of just an offset
186 typedef struct _FcPatternElt {
191 #define FcPatternEltValues(pe) FcPointerMember(pe,values,FcValueList)
196 intptr_t elts_offset;
200 #define FcPatternElts(p) FcOffsetMember(p,elts_offset,FcPatternElt)
202 #define FcFontSetFonts(fs) FcPointerMember(fs,fonts,FcPattern *)
204 #define FcFontSetFont(fs,i) (FcIsEncodedOffset((fs)->fonts) ? \
205 FcEncodedOffsetToPtr(fs, \
206 FcFontSetFonts(fs)[i], \
211 FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpRange, FcOpBool, FcOpCharSet, FcOpLangSet,
213 FcOpField, FcOpConst,
214 FcOpAssign, FcOpAssignReplace,
215 FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
217 FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
218 FcOpContains, FcOpListing, FcOpNotContains,
219 FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
220 FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
221 FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
225 typedef enum _FcOpFlags {
226 FcOpFlagIgnoreBlanks = 1 << 0
229 #define FC_OP_GET_OP(_x_) ((_x_) & 0xffff)
230 #define FC_OP_GET_FLAGS(_x_) (((_x_) & 0xffff0000) >> 16)
231 #define FC_OP(_x_,_f_) (FC_OP_GET_OP (_x_) | ((_f_) << 16))
233 typedef struct _FcExprMatrix {
234 struct _FcExpr *xx, *xy, *yx, *yy;
237 typedef struct _FcExprName {
243 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 3
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 */
511 typedef struct _FcFileTime {
516 typedef struct _FcCharMap FcCharMap;
518 typedef struct _FcRange FcRange;
525 typedef struct _FcStatFS FcStatFS;
529 FcBool is_mtime_broken;
532 typedef struct _FcValuePromotionBuffer FcValuePromotionBuffer;
534 struct _FcValuePromotionBuffer {
539 char c[256]; /* Enlarge as needed */
548 FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
551 FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
554 FcDirCacheWrite (FcCache *cache, FcConfig *config);
557 FcDirCacheCreateTagFile (const FcChar8 *cache_dir);
560 FcCacheObjectReference (void *object);
563 FcCacheObjectDereference (void *object);
569 FcDirCacheReference (FcCache *cache, int nref);
580 FcConfigXdgCacheHome (void);
583 FcConfigXdgConfigHome (void);
586 FcConfigXdgDataHome (void);
589 FcConfigAllocExpr (FcConfig *config);
592 FcConfigAddConfigDir (FcConfig *config,
596 FcConfigAddFontDir (FcConfig *config,
600 FcConfigAddDir (FcConfig *config,
604 FcConfigAddCacheDir (FcConfig *config,
608 FcConfigAddConfigFile (FcConfig *config,
612 FcConfigAddBlank (FcConfig *config,
616 FcConfigAddEdit (FcConfig *config,
622 FcConfigSetFonts (FcConfig *config,
627 FcConfigCompareValue (const FcValue *m,
632 FcConfigGlobAdd (FcConfig *config,
637 FcConfigAcceptFilename (FcConfig *config,
638 const FcChar8 *filename);
641 FcConfigPatternsAdd (FcConfig *config,
646 FcConfigAcceptFont (FcConfig *config,
647 const FcPattern *font);
650 FcConfigModifiedTime (FcConfig *config);
653 FcConfigAddCache (FcConfig *config, FcCache *cache,
654 FcSetName set, FcStrSet *dirSet);
658 FcAlignSize (intptr_t size);
660 FcPrivate FcSerialize *
661 FcSerializeCreate (void);
664 FcSerializeDestroy (FcSerialize *serialize);
667 FcSerializeAlloc (FcSerialize *serialize, const void *object, int size);
670 FcSerializeReserve (FcSerialize *serialize, int size);
673 FcSerializeOffset (FcSerialize *serialize, const void *object);
676 FcSerializePtr (FcSerialize *serialize, const void *object);
679 FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l);
681 FcPrivate FcLangSet *
682 FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l);
686 FcLangCharSetPopulate (void);
688 FcPrivate FcCharSetFreezer *
689 FcCharSetFreezerCreate (void);
691 FcPrivate const FcCharSet *
692 FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs);
695 FcCharSetFreezerDestroy (FcCharSetFreezer *freezer);
698 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
700 FcPrivate FcCharSet *
701 FcNameParseCharSet (FcChar8 *string);
704 FcNameUnparseValue (FcStrBuf *buf,
709 FcNameUnparseValueList (FcStrBuf *buf,
713 FcPrivate FcCharLeaf *
714 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
717 FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs);
719 FcPrivate FcCharSet *
720 FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
723 FcCharSetGetNumbers(const FcCharSet *c);
728 FcValuePrintFile (FILE *f, const FcValue v);
731 FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark);
734 FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos);
737 FcValueListPrint (FcValueListPtr l);
740 FcLangSetPrint (const FcLangSet *ls);
746 FcTestPrint (const FcTest *test);
749 FcExprPrint (const FcExpr *expr);
752 FcEditPrint (const FcEdit *edit);
755 FcSubstPrint (const FcSubst *subst);
758 FcCharSetPrint (const FcCharSet *c);
760 extern FcPrivate int FcDebugVal;
762 #define FcDebug() (FcDebugVal)
769 FcGetDefaultLang (void);
772 FcDefaultFini (void);
777 FcFileIsLink (const FcChar8 *file);
780 FcFileScanConfig (FcFontSet *set,
787 FcDirScanConfig (FcFontSet *set,
801 FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
803 FcPrivate FcFontSet *
804 FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
808 FcTestDestroy (FcTest *test);
811 FcEditDestroy (FcEdit *e);
814 FcPrivate FcLangSet *
815 FcFreeTypeLangSet (const FcCharSet *charset,
816 const FcChar8 *exclusiveLang);
819 FcLangNormalize (const FcChar8 *lang);
821 FcPrivate FcLangResult
822 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
824 FcPrivate FcLangSet *
825 FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *buf);
827 FcPrivate FcLangSet *
828 FcNameParseLangSet (const FcChar8 *string);
831 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
834 FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
839 FcListPatternMatchAny (const FcPattern *p,
840 const FcPattern *font);
847 FC_INVALID_OBJECT = 0,
848 #define FC_OBJECT(NAME, Type) FC_##NAME##_OBJECT,
851 FC_ONE_AFTER_MAX_BASE_OBJECT
852 #define FC_MAX_BASE_OBJECT (FC_ONE_AFTER_MAX_BASE_OBJECT - 1)
856 FcNameBool (const FcChar8 *v, FcBool *result);
859 FcObjectValidType (FcObject object, FcType type);
862 FcObjectFromName (const char * name);
864 FcPrivate const char *
865 FcObjectName (FcObject object);
867 FcPrivate FcObjectSet *
868 FcObjectGetSet (void);
870 #define FcObjectCompare(a, b) ((int) a - (int) b)
875 FcValueCanonicalize (const FcValue *v);
877 FcPrivate FcValueListPtr
878 FcValueListCreate (void);
881 FcValueListDestroy (FcValueListPtr l);
883 FcPrivate FcValueListPtr
884 FcValueListPrepend (FcValueListPtr vallist,
886 FcValueBinding binding);
888 FcPrivate FcValueListPtr
889 FcValueListAppend (FcValueListPtr vallist,
891 FcValueBinding binding);
893 FcPrivate FcValueListPtr
894 FcValueListDuplicate(FcValueListPtr orig);
896 FcPrivate FcPatternElt *
897 FcPatternObjectFindElt (const FcPattern *p, FcObject object);
899 FcPrivate FcPatternElt *
900 FcPatternObjectInsertElt (FcPattern *p, FcObject object);
903 FcPatternObjectListAdd (FcPattern *p,
909 FcPatternObjectAddWithBinding (FcPattern *p,
912 FcValueBinding binding,
916 FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
919 FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
922 FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
925 FcPatternObjectDel (FcPattern *p, FcObject object);
928 FcPatternObjectRemove (FcPattern *p, FcObject object, int id);
931 FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i);
934 FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d);
937 FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s);
940 FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s);
943 FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c);
946 FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
949 FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
952 FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
955 FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d);
958 FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s);
961 FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s);
964 FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c);
967 FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
970 FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
973 FcPatternAppend (FcPattern *p, FcPattern *s);
976 FcStringHash (const FcChar8 *s);
979 FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat);
981 FcPrivate FcPattern *
982 FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat);
985 FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat);
987 FcPrivate FcValueList *
988 FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat);
994 extern FcPrivate const FcMatrix FcIdentityMatrix;
997 FcMatrixFree (FcMatrix *mat);
1002 FcStat (const FcChar8 *file, struct stat *statb);
1005 FcStatChecksum (const FcChar8 *file, struct stat *statb);
1008 FcIsFsMmapSafe (int fd);
1011 FcIsFsMtimeBroken (const FcChar8 *dir);
1015 FcStrSetAddLangs (FcStrSet *strs, const char *languages);
1018 FcStrSetSort (FcStrSet * set);
1021 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
1024 FcStrBufDestroy (FcStrBuf *buf);
1027 FcStrBufDone (FcStrBuf *buf);
1030 FcStrBufDoneStatic (FcStrBuf *buf);
1033 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
1036 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
1039 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
1042 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1045 FcStrRegexCmp (const FcChar8 *s, const FcChar8 *regex);
1048 FcStrRegexCmpIgnoreCase (const FcChar8 *s, const FcChar8 *regex);
1050 FcPrivate const FcChar8 *
1051 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1053 FcPrivate const FcChar8 *
1054 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
1056 FcPrivate const FcChar8 *
1057 FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2);
1060 FcStrUsesHome (const FcChar8 *s);
1063 FcStrLastSlash (const FcChar8 *path);
1066 FcStrHashIgnoreCase (const FcChar8 *s);
1069 FcStrCanonFilename (const FcChar8 *s);
1072 FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
1075 FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
1080 FcObjectLookupIdByName (const char *str);
1083 FcObjectLookupBuiltinIdByName (const char *str);
1085 FcPrivate const char *
1086 FcObjectLookupOtherNameById (FcObject id);
1088 FcPrivate const FcObjectType *
1089 FcObjectLookupOtherTypeById (FcObject id);
1091 FcPrivate const FcObjectType *
1092 FcObjectLookupOtherTypeByName (const char *str);
1094 #endif /* _FC_INT_H_ */