/*
* $RCSId: xc/lib/fontconfig/src/fcint.h,v 1.27 2002/08/31 22:17:32 keithp Exp $
*
- * Copyright © 2000 Keith Packard
+ * Copyright © 2000 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
#define FC_DBG_SCAN 128
#define FC_DBG_SCANV 256
#define FC_DBG_MEMORY 512
+#define FC_DBG_CONFIG 1024
#define FC_MEM_CHARSET 0
#define FC_MEM_CHARLEAF 1
#define FC_MEM_VSTACK 26
#define FC_MEM_ATTR 27
#define FC_MEM_PSTACK 28
+#define FC_MEM_STATICSTR 29
-#define FC_MEM_NUM 29
+#define FC_MEM_NUM 30
typedef enum _FcValueBinding {
FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame
FcChar8 name[1]; /* name extends beyond struct */
} FcGlyphName;
+/*
+ * To perform case-insensitive string comparisons, a table
+ * is used which holds three different kinds of folding data.
+ *
+ * The first is a range of upper case values mapping to a range
+ * of their lower case equivalents. Within each range, the offset
+ * between upper and lower case is constant.
+ *
+ * The second is a range of upper case values which are interleaved
+ * with their lower case equivalents.
+ *
+ * The third is a set of raw unicode values mapping to a list
+ * of unicode values for comparison purposes. This allows conversion
+ * of ß to "ss" so that SS, ss and ß all match. A separate array
+ * holds the list of unicode values for each entry.
+ *
+ * These are packed into a single table. Using a binary search,
+ * the appropriate entry can be located.
+ */
+
+#define FC_CASE_FOLD_RANGE 0
+#define FC_CASE_FOLD_EVEN_ODD 1
+#define FC_CASE_FOLD_FULL 2
+
+typedef struct _FcCaseFold {
+ FcChar32 upper;
+ FcChar16 method : 2;
+ FcChar16 count : 14;
+ short offset; /* lower - upper for RANGE, table id for FULL */
+} FcCaseFold;
+
+#define FC_MAX_FILE_LEN 4096
+
/*
* The per-user ~/.fonts.cache-<version> file is loaded into
* this data structure. Each directory gets a substructure
/* fcdir.c */
+FcBool
+FcFileIsDir (const FcChar8 *file);
+
FcBool
FcFileScanConfig (FcFontSet *set,
FcStrSet *dirs,
char *
FcConfigSaveField (const char *field);
-FcTest *
-FcTestCreate (FcMatchKind kind,
- FcQual qual,
- const FcChar8 *field,
- FcOp compare,
- FcExpr *expr);
-
void
FcTestDestroy (FcTest *test);
void
FcExprDestroy (FcExpr *e);
-FcEdit *
-FcEditCreate (const char *field, FcOp op, FcExpr *expr, FcValueBinding binding);
-
void
FcEditDestroy (FcEdit *e);
/* fcname.c */
FcBool
-FcNameBool (FcChar8 *v, FcBool *result);
+FcNameBool (const FcChar8 *v, FcBool *result);
/* fcpat.c */
void
FcChar8 *
FcStrLastSlash (const FcChar8 *path);
+FcChar32
+FcStrHashIgnoreCase (const FcChar8 *s);
+
#endif /* _FC_INT_H_ */