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.
34 #ifdef HAVE_INTTYPES_H
36 #elif defined(HAVE_STDINT_H)
39 #error missing C99 integer data types
46 #include <sys/types.h>
49 #include <fontconfig/fontconfig.h>
50 #include <fontconfig/fcprivate.h>
51 #include "fcdeprecate.h"
53 #ifndef FC_CONFIG_PATH
54 #define FC_CONFIG_PATH "fonts.conf"
59 # define _WIN32_WINNT 0x0500
61 # define WIN32_LEAN_AND_MEAN
64 typedef UINT (WINAPI *pfnGetSystemWindowsDirectory)(LPSTR, UINT);
65 typedef HRESULT (WINAPI *pfnSHGetFolderPathA)(HWND, int, HANDLE, DWORD, LPSTR);
66 extern pfnGetSystemWindowsDirectory pGetSystemWindowsDirectory;
67 extern pfnSHGetFolderPathA pSHGetFolderPathA;
68 # define FC_SEARCH_PATH_SEPARATOR ';'
69 # define FC_DIR_SEPARATOR '\\'
70 # define FC_DIR_SEPARATOR_S "\\"
72 # define FC_SEARCH_PATH_SEPARATOR ':'
73 # define FC_DIR_SEPARATOR '/'
74 # define FC_DIR_SEPARATOR_S "/"
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_MEMORY 512
87 #define FC_DBG_CONFIG 1024
88 #define FC_DBG_LANGSET 2048
89 #define FC_DBG_OBJTYPES 4096
91 #define FC_MEM_CHARSET 0
92 #define FC_MEM_CHARLEAF 1
93 #define FC_MEM_FONTSET 2
94 #define FC_MEM_FONTPTR 3
95 #define FC_MEM_OBJECTSET 4
96 #define FC_MEM_OBJECTPTR 5
97 #define FC_MEM_MATRIX 6
98 #define FC_MEM_PATTERN 7
99 #define FC_MEM_PATELT 8
100 #define FC_MEM_VALLIST 9
101 #define FC_MEM_SUBSTATE 10
102 #define FC_MEM_STRING 11
103 #define FC_MEM_LISTBUCK 12
104 #define FC_MEM_STRSET 13
105 #define FC_MEM_STRLIST 14
106 #define FC_MEM_CONFIG 15
107 #define FC_MEM_LANGSET 16
108 #define FC_MEM_ATOMIC 17
109 #define FC_MEM_BLANKS 18
110 #define FC_MEM_CACHE 19
111 #define FC_MEM_STRBUF 20
112 #define FC_MEM_SUBST 21
113 #define FC_MEM_OBJECTTYPE 22
114 #define FC_MEM_CONSTANT 23
115 #define FC_MEM_TEST 24
116 #define FC_MEM_EXPR 25
117 #define FC_MEM_VSTACK 26
118 #define FC_MEM_ATTR 27
119 #define FC_MEM_PSTACK 28
120 #define FC_MEM_SHAREDSTR 29
122 #define FC_MEM_NUM 30
124 #define _FC_ASSERT_STATIC1(_line, _cond) typedef int _static_assert_on_line_##_line##_failed[(_cond)?1:-1]
125 #define _FC_ASSERT_STATIC0(_line, _cond) _FC_ASSERT_STATIC1 (_line, (_cond))
126 #define FC_ASSERT_STATIC(_cond) _FC_ASSERT_STATIC0 (__LINE__, (_cond))
128 #define FC_MIN(a,b) ((a) < (b) ? (a) : (b))
129 #define FC_MAX(a,b) ((a) > (b) ? (a) : (b))
130 #define FC_ABS(a) ((a) < 0 ? -(a) : (a))
132 /* slim_internal.h */
133 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun)
134 #define FcPrivate __attribute__((__visibility__("hidden")))
135 #define HAVE_GNUC_ATTRIBUTE 1
137 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
138 #define FcPrivate __hidden
139 #else /* not gcc >= 3.3 and not Sun Studio >= 8 */
143 typedef enum _FcValueBinding {
144 FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame
148 * Serialized data structures use only offsets instead of pointers
149 * A low bit of 1 indicates an offset.
152 /* Is the provided pointer actually an offset? */
153 #define FcIsEncodedOffset(p) ((((intptr_t) (p)) & 1) != 0)
155 /* Encode offset in a pointer of type t */
156 #define FcOffsetEncode(o,t) ((t *) ((o) | 1))
158 /* Decode a pointer into an offset */
159 #define FcOffsetDecode(p) (((intptr_t) (p)) & ~1)
161 /* Compute pointer offset */
162 #define FcPtrToOffset(b,p) ((intptr_t) (p) - (intptr_t) (b))
164 /* Given base address, offset and type, return a pointer */
165 #define FcOffsetToPtr(b,o,t) ((t *) ((intptr_t) (b) + (o)))
167 /* Given base address, encoded offset and type, return a pointer */
168 #define FcEncodedOffsetToPtr(b,p,t) FcOffsetToPtr(b,FcOffsetDecode(p),t)
170 /* Given base address, pointer and type, return an encoded offset */
171 #define FcPtrToEncodedOffset(b,p,t) FcOffsetEncode(FcPtrToOffset(b,p),t)
173 /* Given a structure, offset member and type, return pointer */
174 #define FcOffsetMember(s,m,t) FcOffsetToPtr(s,(s)->m,t)
176 /* Given a structure, encoded offset member and type, return pointer to member */
177 #define FcEncodedOffsetMember(s,m,t) FcOffsetToPtr(s,FcOffsetDecode((s)->m), t)
179 /* Given a structure, member and type, convert the member to a pointer */
180 #define FcPointerMember(s,m,t) (FcIsEncodedOffset((s)->m) ? \
181 FcEncodedOffsetMember (s,m,t) : \
185 * Serialized values may hold strings, charsets and langsets as pointers,
186 * unfortunately FcValue is an exposed type so we can't just always use
189 #define FcValueString(v) FcPointerMember(v,u.s,FcChar8)
190 #define FcValueCharSet(v) FcPointerMember(v,u.c,const FcCharSet)
191 #define FcValueLangSet(v) FcPointerMember(v,u.l,const FcLangSet)
193 typedef struct _FcValueList *FcValueListPtr;
195 typedef struct _FcValueList {
196 struct _FcValueList *next;
198 FcValueBinding binding;
201 #define FcValueListNext(vl) FcPointerMember(vl,next,FcValueList)
203 typedef int FcObject;
205 typedef struct _FcPatternElt *FcPatternEltPtr;
208 * Pattern elts are stuck in a structure connected to the pattern,
209 * so they get moved around when the pattern is resized. Hence, the
210 * values field must be a pointer/offset instead of just an offset
212 typedef struct _FcPatternElt {
217 #define FcPatternEltValues(pe) FcPointerMember(pe,values,FcValueList)
222 intptr_t elts_offset;
226 #define FcPatternElts(p) FcOffsetMember(p,elts_offset,FcPatternElt)
228 #define FcFontSetFonts(fs) FcPointerMember(fs,fonts,FcPattern *)
230 #define FcFontSetFont(fs,i) (FcIsEncodedOffset((fs)->fonts) ? \
231 FcEncodedOffsetToPtr(fs, \
232 FcFontSetFonts(fs)[i], \
237 FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpRange, FcOpBool, FcOpCharSet, FcOpLangSet,
239 FcOpField, FcOpConst,
240 FcOpAssign, FcOpAssignReplace,
241 FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
243 FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
244 FcOpContains, FcOpListing, FcOpNotContains,
245 FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
246 FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
247 FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
251 typedef enum _FcOpFlags {
252 FcOpFlagIgnoreBlanks = 1 << 0
255 #define FC_OP_GET_OP(_x_) ((_x_) & 0xffff)
256 #define FC_OP_GET_FLAGS(_x_) (((_x_) & 0xffff0000) >> 16)
257 #define FC_OP(_x_,_f_) (FC_OP_GET_OP (_x_) | ((_f_) << 16))
259 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 {
293 struct _FcTest *next;
301 typedef struct _FcEdit {
302 struct _FcEdit *next;
306 FcValueBinding binding;
309 typedef struct _FcSubst {
310 struct _FcSubst *next;
315 typedef struct _FcCharLeaf {
316 FcChar32 map[256/32];
319 #define FC_REF_CONSTANT -1
322 int ref; /* reference count */
323 int num; /* size of leaves and numbers arrays */
324 intptr_t leaves_offset;
325 intptr_t numbers_offset;
328 #define FcCharSetLeaves(c) FcOffsetMember(c,leaves_offset,intptr_t)
329 #define FcCharSetLeaf(c,i) (FcOffsetToPtr(FcCharSetLeaves(c), \
330 FcCharSetLeaves(c)[i], \
332 #define FcCharSetNumbers(c) FcOffsetMember(c,numbers_offset,FcChar16)
335 int ref; /* reference count */
346 typedef struct _FcStrBuf {
352 FcChar8 buf_static[16 * sizeof (void *)];
356 int magic; /* FC_CACHE_MAGIC_MMAP or FC_CACHE_ALLOC */
357 int version; /* FC_CACHE_CONTENT_VERSION */
358 intptr_t size; /* size of file */
359 intptr_t dir; /* offset to dir name */
360 intptr_t dirs; /* offset to subdirs */
361 int dirs_count; /* number of subdir strings */
362 intptr_t set; /* offset to font set */
363 int checksum; /* checksum of directory state */
368 #define FcCacheDir(c) FcOffsetMember(c,dir,FcChar8)
369 #define FcCacheDirs(c) FcOffsetMember(c,dirs,intptr_t)
370 #define FcCacheSet(c) FcOffsetMember(c,set,FcFontSet)
371 #define FcCacheSubdir(c,i) FcOffsetToPtr (FcCacheDirs(c),\
376 * Used while constructing a directory cache object
379 #define FC_SERIALIZE_HASH_SIZE 8191
381 typedef union _FcAlign {
389 typedef struct _FcSerializeBucket {
390 struct _FcSerializeBucket *next;
395 typedef struct _FcCharSetFreezer FcCharSetFreezer;
397 typedef struct _FcSerialize {
399 FcCharSetFreezer *cs_freezer;
401 FcSerializeBucket *buckets[FC_SERIALIZE_HASH_SIZE];
405 * To map adobe glyph names to unicode values, a precomputed hash
409 typedef struct _FcGlyphName {
410 FcChar32 ucs; /* unicode value */
411 FcChar8 name[1]; /* name extends beyond struct */
415 * To perform case-insensitive string comparisons, a table
416 * is used which holds three different kinds of folding data.
418 * The first is a range of upper case values mapping to a range
419 * of their lower case equivalents. Within each range, the offset
420 * between upper and lower case is constant.
422 * The second is a range of upper case values which are interleaved
423 * with their lower case equivalents.
425 * The third is a set of raw unicode values mapping to a list
426 * of unicode values for comparison purposes. This allows conversion
427 * of ß to "ss" so that SS, ss and ß all match. A separate array
428 * holds the list of unicode values for each entry.
430 * These are packed into a single table. Using a binary search,
431 * the appropriate entry can be located.
434 #define FC_CASE_FOLD_RANGE 0
435 #define FC_CASE_FOLD_EVEN_ODD 1
436 #define FC_CASE_FOLD_FULL 2
438 typedef struct _FcCaseFold {
442 short offset; /* lower - upper for RANGE, table id for FULL */
445 #define FC_MAX_FILE_LEN 4096
447 #define FC_CACHE_MAGIC_MMAP 0xFC02FC04
448 #define FC_CACHE_MAGIC_ALLOC 0xFC02FC05
449 #define FC_CACHE_CONTENT_VERSION 3 /* also check FC_CACHE_VERSION */
452 FcChar8 *file; /* original file name */
453 FcChar8 *new; /* temp file name -- write data here */
454 FcChar8 *lck; /* lockfile name (used for locking) */
455 FcChar8 *tmp; /* tmpfile name (used for locking) */
466 * File names loaded from the configuration -- saved here as the
467 * cache file must be consulted before the directories are scanned,
468 * and those directives may occur in any order
470 FcStrSet *configDirs; /* directories to scan for fonts */
472 * Set of allowed blank chars -- used to
473 * trim fonts of bogus glyphs
477 * List of directories containing fonts,
478 * built by recursively scanning the set
479 * of configured directories
483 * List of directories containing cache files.
487 * Names of all of the configuration files used
488 * to create this configuration
490 FcStrSet *configFiles; /* config files loaded */
492 * Substitution instructions for patterns and fonts;
493 * maxObjects is used to allocate appropriate intermediate storage
494 * while performing a whole set of substitutions
496 FcSubst *substPattern; /* substitutions for patterns */
497 FcSubst *substFont; /* substitutions for fonts */
498 FcSubst *substScan; /* substitutions for scanned fonts */
499 int maxObjects; /* maximum number of tests in all substs */
501 * List of patterns used to control font file selection
503 FcStrSet *acceptGlobs;
504 FcStrSet *rejectGlobs;
505 FcFontSet *acceptPatterns;
506 FcFontSet *rejectPatterns;
508 * The set of fonts loaded from the listed directories; the
509 * order within the set does not determine the font selection,
510 * except in the case of identical matches in which case earlier fonts
511 * match preferrentially
513 FcFontSet *fonts[FcSetApplication + 1];
515 * Fontconfig can periodically rescan the system configuration
516 * and font directories. This rescanning occurs when font
517 * listing requests are made, but no more often than rescanInterval
520 time_t rescanTime; /* last time information was scanned */
521 int rescanInterval; /* interval between scans */
523 int ref; /* reference count */
525 FcExprPage *expr_pool; /* pool of FcExpr's */
528 extern FcPrivate FcConfig *_fcConfig;
530 typedef struct _FcFileTime {
535 typedef struct _FcCharMap FcCharMap;
537 typedef struct _FcRange FcRange;
544 typedef struct _FcStatFS FcStatFS;
548 FcBool is_mtime_broken;
556 FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
559 FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
562 FcDirCacheWrite (FcCache *cache, FcConfig *config);
565 FcDirCacheCreateTagFile (const FcChar8 *cache_dir);
568 FcCacheObjectReference (void *object);
571 FcCacheObjectDereference (void *object);
577 FcDirCacheReference (FcCache *cache, int nref);
582 FcConfigXdgCacheHome (void);
585 FcConfigXdgConfigHome (void);
588 FcConfigXdgDataHome (void);
591 FcConfigAllocExpr (FcConfig *config);
594 FcConfigAddConfigDir (FcConfig *config,
598 FcConfigAddFontDir (FcConfig *config,
602 FcConfigAddDir (FcConfig *config,
606 FcConfigAddCacheDir (FcConfig *config,
610 FcConfigAddConfigFile (FcConfig *config,
614 FcConfigAddBlank (FcConfig *config,
618 FcConfigAddEdit (FcConfig *config,
624 FcConfigSetFonts (FcConfig *config,
629 FcConfigCompareValue (const FcValue *m,
634 FcConfigGlobAdd (FcConfig *config,
639 FcConfigAcceptFilename (FcConfig *config,
640 const FcChar8 *filename);
643 FcConfigPatternsAdd (FcConfig *config,
648 FcConfigAcceptFont (FcConfig *config,
649 const FcPattern *font);
652 FcConfigModifiedTime (FcConfig *config);
655 FcConfigAddCache (FcConfig *config, FcCache *cache,
656 FcSetName set, FcStrSet *dirSet);
660 FcAlignSize (intptr_t size);
662 FcPrivate FcSerialize *
663 FcSerializeCreate (void);
666 FcSerializeDestroy (FcSerialize *serialize);
669 FcSerializeAlloc (FcSerialize *serialize, const void *object, int size);
672 FcSerializeReserve (FcSerialize *serialize, int size);
675 FcSerializeOffset (FcSerialize *serialize, const void *object);
678 FcSerializePtr (FcSerialize *serialize, const void *object);
681 FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l);
683 FcPrivate FcLangSet *
684 FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l);
688 FcLangCharSetPopulate (void);
690 FcPrivate FcCharSetFreezer *
691 FcCharSetFreezerCreate (void);
693 FcPrivate const FcCharSet *
694 FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs);
697 FcCharSetFreezerDestroy (FcCharSetFreezer *freezer);
700 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
702 FcPrivate FcCharSet *
703 FcNameParseCharSet (FcChar8 *string);
706 FcNameUnparseValue (FcStrBuf *buf,
711 FcNameUnparseValueList (FcStrBuf *buf,
715 FcPrivate FcCharLeaf *
716 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
719 FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs);
721 FcPrivate FcCharSet *
722 FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
725 FcCharSetGetNumbers(const FcCharSet *c);
729 FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark);
732 FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos);
735 FcValueListPrint (FcValueListPtr l);
738 FcLangSetPrint (const FcLangSet *ls);
744 FcTestPrint (const FcTest *test);
747 FcExprPrint (const FcExpr *expr);
750 FcEditPrint (const FcEdit *edit);
753 FcSubstPrint (const FcSubst *subst);
756 FcCharSetPrint (const FcCharSet *c);
758 extern FcPrivate int FcDebugVal;
760 #define FcDebug() (FcDebugVal)
767 FcGetDefaultLang (void);
772 FcFileScanConfig (FcFontSet *set,
779 FcDirScanConfig (FcFontSet *set,
793 FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
795 FcPrivate FcFontSet *
796 FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
800 FcTestDestroy (FcTest *test);
803 FcEditDestroy (FcEdit *e);
811 FcMemAlloc (int kind, int size);
814 FcMemFree (int kind, int size);
817 FcPrivate FcLangSet *
818 FcFreeTypeLangSet (const FcCharSet *charset,
819 const FcChar8 *exclusiveLang);
822 FcLangNormalize (const FcChar8 *lang);
824 FcPrivate FcLangResult
825 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
827 FcPrivate FcLangSet *
828 FcLangSetPromote (const FcChar8 *lang);
830 FcPrivate FcLangSet *
831 FcNameParseLangSet (const FcChar8 *string);
834 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
837 FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
842 FcListPatternMatchAny (const FcPattern *p,
843 const FcPattern *font);
850 * NOTE -- this ordering is part of the cache file format.
851 * It must also match the ordering in fcname.c
854 #define FC_FAMILY_OBJECT 1
855 #define FC_FAMILYLANG_OBJECT 2
856 #define FC_STYLE_OBJECT 3
857 #define FC_STYLELANG_OBJECT 4
858 #define FC_FULLNAME_OBJECT 5
859 #define FC_FULLNAMELANG_OBJECT 6
860 #define FC_SLANT_OBJECT 7
861 #define FC_WEIGHT_OBJECT 8
862 #define FC_WIDTH_OBJECT 9
863 #define FC_SIZE_OBJECT 10
864 #define FC_ASPECT_OBJECT 11
865 #define FC_PIXEL_SIZE_OBJECT 12
866 #define FC_SPACING_OBJECT 13
867 #define FC_FOUNDRY_OBJECT 14
868 #define FC_ANTIALIAS_OBJECT 15
869 #define FC_HINT_STYLE_OBJECT 16
870 #define FC_HINTING_OBJECT 17
871 #define FC_VERTICAL_LAYOUT_OBJECT 18
872 #define FC_AUTOHINT_OBJECT 19
873 #define FC_GLOBAL_ADVANCE_OBJECT 20 /* deprecated */
874 #define FC_FILE_OBJECT 21
875 #define FC_INDEX_OBJECT 22
876 #define FC_RASTERIZER_OBJECT 23
877 #define FC_OUTLINE_OBJECT 24
878 #define FC_SCALABLE_OBJECT 25
879 #define FC_DPI_OBJECT 26
880 #define FC_RGBA_OBJECT 27
881 #define FC_SCALE_OBJECT 28
882 #define FC_MINSPACE_OBJECT 29
883 #define FC_CHAR_WIDTH_OBJECT 30
884 #define FC_CHAR_HEIGHT_OBJECT 31
885 #define FC_MATRIX_OBJECT 32
886 #define FC_CHARSET_OBJECT 33
887 #define FC_LANG_OBJECT 34
888 #define FC_FONTVERSION_OBJECT 35
889 #define FC_CAPABILITY_OBJECT 36
890 #define FC_FONTFORMAT_OBJECT 37
891 #define FC_EMBOLDEN_OBJECT 38
892 #define FC_EMBEDDED_BITMAP_OBJECT 39
893 #define FC_DECORATIVE_OBJECT 40
894 #define FC_LCD_FILTER_OBJECT 41
895 #define FC_NAMELANG_OBJECT 42
896 #define FC_MAX_BASE_OBJECT FC_NAMELANG_OBJECT
899 FcNameBool (const FcChar8 *v, FcBool *result);
902 FcObjectValidType (FcObject object, FcType type);
905 FcObjectFromName (const char * name);
907 FcPrivate const char *
908 FcObjectName (FcObject object);
910 FcPrivate FcObjectSet *
911 FcObjectGetSet (void);
919 #define FcObjectCompare(a, b) ((int) a - (int) b)
924 FcValueCanonicalize (const FcValue *v);
927 FcValueListDestroy (FcValueListPtr l);
929 FcPrivate FcPatternElt *
930 FcPatternObjectFindElt (const FcPattern *p, FcObject object);
932 FcPrivate FcPatternElt *
933 FcPatternObjectInsertElt (FcPattern *p, FcObject object);
936 FcPatternObjectAddWithBinding (FcPattern *p,
939 FcValueBinding binding,
943 FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
946 FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
949 FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
952 FcPatternObjectDel (FcPattern *p, FcObject object);
955 FcPatternObjectRemove (FcPattern *p, FcObject object, int id);
958 FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i);
961 FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d);
964 FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s);
967 FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s);
970 FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c);
973 FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
976 FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
979 FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
982 FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d);
985 FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s);
988 FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s);
991 FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c);
994 FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
997 FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
1000 FcPatternAppend (FcPattern *p, FcPattern *s);
1002 FcPrivate const FcChar8 *
1003 FcSharedStr (const FcChar8 *name);
1006 FcSharedStrFree (const FcChar8 *name);
1009 FcStringHash (const FcChar8 *s);
1012 FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat);
1014 FcPrivate FcPattern *
1015 FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat);
1018 FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat);
1020 FcPrivate FcValueList *
1021 FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat);
1027 extern FcPrivate const FcMatrix FcIdentityMatrix;
1030 FcMatrixFree (FcMatrix *mat);
1035 FcStat (const FcChar8 *file, struct stat *statb);
1038 FcStatChecksum (const FcChar8 *file, struct stat *statb);
1041 FcIsFsMmapSafe (int fd);
1044 FcIsFsMtimeBroken (const FcChar8 *dir);
1048 FcStrSetAddLangs (FcStrSet *strs, const char *languages);
1051 FcStrSetSort (FcStrSet * set);
1054 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
1057 FcStrBufDestroy (FcStrBuf *buf);
1060 FcStrBufDone (FcStrBuf *buf);
1063 FcStrBufDoneStatic (FcStrBuf *buf);
1066 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
1069 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
1072 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
1075 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1078 FcStrRegexCmp (const FcChar8 *s, const FcChar8 *regex);
1081 FcStrRegexCmpIgnoreCase (const FcChar8 *s, const FcChar8 *regex);
1083 FcPrivate const FcChar8 *
1084 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1086 FcPrivate const FcChar8 *
1087 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
1089 FcPrivate const FcChar8 *
1090 FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2);
1093 FcStrUsesHome (const FcChar8 *s);
1096 FcStrLastSlash (const FcChar8 *path);
1099 FcStrHashIgnoreCase (const FcChar8 *s);
1102 FcStrCanonFilename (const FcChar8 *s);
1105 FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
1108 FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
1110 #endif /* _FC_INT_H_ */