]> git.wh0rd.org - fontconfig.git/blobdiff - fontconfig/fontconfig.h
Various config changes plus a couple of optimizations from Owen
[fontconfig.git] / fontconfig / fontconfig.h
index 1d1155335ae40bb55fe88cefe2ae98fb1039e067..6f378cd9ad702814babdb7a0204c05c0e5b4abe0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.14 2002/05/31 23:21:24 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.25 2002/08/11 18:10:41 keithp Exp $
  *
  * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -101,45 +101,6 @@ typedef int                FcBool;
 #define FC_RGBA_VRGB       3
 #define FC_RGBA_VBGR       4
 
-/* language groups from the OS/2 CodePageRange bits */
-#define FC_LANG_LATIN_1                        "latin1"                /* 0 */
-#define FC_LANG_LATIN_2_EASTERN_EUROPE "latin2easterneurope"   /* 1 */
-#define FC_LANG_CYRILLIC               "cyrillic"              /* 2 */
-#define FC_LANG_GREEK                  "greek"                 /* 3 */
-#define FC_LANG_TURKISH                        "turkish"               /* 4 */
-#define FC_LANG_HEBREW                 "hebrew"                /* 5 */
-#define FC_LANG_ARABIC                 "arabic"                /* 6 */
-#define FC_LANG_WINDOWS_BALTIC         "windowsbaltic"         /* 7 */
-#define FC_LANG_VIETNAMESE             "vietnamese"            /* 8 */
-/* 9-15 reserved for Alternate ANSI */
-#define FC_LANG_THAI                   "thai"                  /* 16 */
-#define FC_LANG_JAPANESE               "japanese"              /* 17 */
-#define FC_LANG_SIMPLIFIED_CHINESE     "simplifiedchinese"     /* 18 */
-#define FC_LANG_KOREAN_WANSUNG         "koreanwansung"         /* 19 */
-#define FC_LANG_TRADITIONAL_CHINESE    "traditionalchinese"    /* 20 */
-#define FC_LANG_KOREAN_JOHAB           "koreanjohab"           /* 21 */
-/* 22-28 reserved for Alternate ANSI & OEM */
-#define FC_LANG_MACINTOSH              "macintosh"             /* 29 */
-#define FC_LANG_OEM                    "oem"                   /* 30 */
-#define FC_LANG_SYMBOL                 "symbol"                /* 31 */
-/* 32-47 reserved for OEM */
-#define FC_LANG_IBM_GREEK              "ibmgreek"              /* 48 */
-#define FC_LANG_MSDOS_RUSSIAN          "msdosrussian"          /* 49 */
-#define FC_LANG_MSDOS_NORDIC           "msdosnordic"           /* 50 */
-#define FC_LANG_ARABIC_864             "arabic864"             /* 51 */
-#define FC_LANG_MSDOS_CANADIAN_FRENCH  "msdoscanadianfrench"   /* 52 */
-#define FC_LANG_HEBREW_862             "hebrew862"             /* 53 */
-#define FC_LANG_MSDOS_ICELANDIC                "msdosicelandic"        /* 54 */
-#define FC_LANG_MSDOS_PORTUGUESE       "msdosportuguese"       /* 55 */
-#define FC_LANG_IBM_TURKISH            "ibmturkish"            /* 56 */
-#define FC_LANG_IBM_CYRILLIC           "ibmcyrillic"           /* 57 */
-#define FC_LANG_LATIN_2                        "latin2"                /* 58 */
-#define FC_LANG_MSDOS_BALTIC           "msdosbaltic"           /* 59 */
-#define FC_LANG_GREEK_437_G            "greek437g"             /* 60 */
-#define FC_LANG_ARABIC_ASMO_708                "arabicasmo708"         /* 61 */
-#define FC_LANG_WE_LATIN_1             "welatin1"              /* 62 */
-#define FC_LANG_US                     "us"                    /* 63 */
-
 typedef enum _FcType {
     FcTypeVoid, 
     FcTypeInteger, 
@@ -180,6 +141,8 @@ typedef enum _FcResult {
     FcResultMatch, FcResultNoMatch, FcResultTypeMismatch, FcResultNoId
 } FcResult;
 
+typedef struct _FcPattern   FcPattern;
+
 typedef struct _FcValue {
     FcType     type;
     union {
@@ -190,11 +153,10 @@ typedef struct _FcValue {
        const FcMatrix  *m;
        const FcCharSet *c;
        void            *f;
+       const FcPattern *p;
     } u;
 } FcValue;
 
-typedef struct _FcPattern   FcPattern;
-
 typedef struct _FcFontSet {
     int                nfont;
     int                sfont;
@@ -208,7 +170,7 @@ typedef struct _FcObjectSet {
 } FcObjectSet;
     
 typedef enum _FcMatchKind {
-    FcMatchPattern, FcMatchFont 
+    FcMatchPattern, FcMatchFont
 } FcMatchKind;
 
 typedef enum _FcSetName {
@@ -226,9 +188,11 @@ typedef struct _FcAtomic FcAtomic;
 #define _FCFUNCPROTOEND
 #endif
 
+typedef enum { FcEndianBig, FcEndianLittle } FcEndian;
+
 typedef struct _FcConfig    FcConfig;
 
-typedef struct _FcFileCache FcFileCache;
+typedef struct _FcGlobalCache  FcFileCache;
 
 typedef struct _FcBlanks    FcBlanks;
 
@@ -238,6 +202,9 @@ typedef struct _FcStrSet    FcStrSet;
 
 _FCFUNCPROTOBEGIN
 
+FcBool
+FcDirCacheValid (const FcChar8 *cache_file);
+
 /* fcblanks.c */
 FcBlanks *
 FcBlanksCreate (void);
@@ -309,6 +276,12 @@ FcConfigAppFontAddDir (FcConfig        *config,
 void
 FcConfigAppFontClear (FcConfig     *config);
 
+FcBool
+FcConfigSubstituteWithPat (FcConfig    *config,
+                          FcPattern    *p,
+                          FcPattern    *p_pat,
+                          FcMatchKind  kind);
+
 FcBool
 FcConfigSubstitute (FcConfig   *config,
                    FcPattern   *p,
@@ -370,13 +343,13 @@ FcCharSetNextPage (const FcCharSet  *a,
 
 /* fcdbg.c */
 void
-FcValuePrint (FcValue v);
+FcValuePrint (const FcValue v);
 
 void
-FcPatternPrint (FcPattern *p);
+FcPatternPrint (const FcPattern *p);
 
 void
-FcFontSetPrint (FcFontSet *s);
+FcFontSetPrint (const FcFontSet *s);
 
 /* fcdefault.c */
 void
@@ -402,9 +375,6 @@ FcDirScan (FcFontSet            *set,
 FcBool
 FcDirSave (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir);
 
-FcBool
-FcDirCacheValid (const FcChar8 *dir);
-
 /* fcfreetype.c */
 FcPattern *
 FcFreeTypeQuery (const FcChar8 *file, int id, FcBlanks *blanks, int *count);
@@ -585,6 +555,9 @@ FcPatternCreate (void);
 FcPattern *
 FcPatternDuplicate (FcPattern *p);
 
+void
+FcPatternReference (FcPattern *p);
+
 void
 FcValueDestroy (FcValue v);
 
@@ -598,11 +571,20 @@ void
 FcPatternDestroy (FcPattern *p);
 
 FcBool
-FcPatternEqual (FcPattern *pa, FcPattern *pb);
+FcPatternEqual (const FcPattern *pa, const FcPattern *pb);
+
+FcBool
+FcPatternEqualSubset (const FcPattern *pa, const FcPattern *pb, const FcObjectSet *os);
+
+FcChar32
+FcPatternHash (const FcPattern *p);
 
 FcBool
 FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append);
     
+FcBool
+FcPatternAddWeak (FcPattern *p, const char *object, FcValue value, FcBool append);
+    
 FcResult
 FcPatternGet (FcPattern *p, const char *object, int id, FcValue *v);
     
@@ -678,6 +660,25 @@ FcUtf8Len (FcChar8 *string,
           int          *nchar,
           int          *wchar);
 
+#define FC_UTF8_MAX_LEN        6
+
+int
+FcUcs4ToUtf8 (FcChar32 ucs4,
+             FcChar8   dest[FC_UTF8_MAX_LEN]);
+
+int
+FcUtf16ToUcs4 (FcChar8 *src_orig,
+              FcEndian endian,
+              FcChar32 *dst,
+              int      len);       /* in bytes */
+
+FcBool
+FcUtf16Len (FcChar8    *string,
+           FcEndian    endian,
+           int         len,        /* in bytes */
+           int         *nchar,
+           int         *wchar);
+
 FcChar8 *
 FcStrDirname (const FcChar8 *file);