Imported Upstream version 2.11.93
[platform/upstream/fontconfig.git] / fontconfig / fontconfig.h
index 52e9438..b14c961 100644 (file)
@@ -51,8 +51,8 @@ typedef int           FcBool;
  */
 
 #define FC_MAJOR       2
-#define FC_MINOR       10
-#define FC_REVISION    91
+#define FC_MINOR       11
+#define FC_REVISION    93
 
 #define FC_VERSION     ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
 
@@ -66,7 +66,7 @@ typedef int           FcBool;
  * it means multiple copies of the font information.
  */
 
-#define FC_CACHE_VERSION    "3"
+#define FC_CACHE_VERSION    "5"
 
 #define FcTrue         1
 #define FcFalse                0
@@ -75,7 +75,7 @@ typedef int           FcBool;
 #define FC_STYLE           "style"             /* String */
 #define FC_SLANT           "slant"             /* Int */
 #define FC_WEIGHT          "weight"            /* Int */
-#define FC_SIZE                    "size"              /* Double */
+#define FC_SIZE                    "size"              /* Range (double) */
 #define FC_ASPECT          "aspect"            /* Double */
 #define FC_PIXEL_SIZE      "pixelsize"         /* Double */
 #define FC_SPACING         "spacing"           /* Int */
@@ -91,9 +91,10 @@ typedef int          FcBool;
 #define FC_FILE                    "file"              /* String */
 #define FC_INDEX           "index"             /* Int */
 #define FC_FT_FACE         "ftface"            /* FT_Face */
-#define FC_RASTERIZER      "rasterizer"        /* String */
+#define FC_RASTERIZER      "rasterizer"        /* String (deprecated) */
 #define FC_OUTLINE         "outline"           /* Bool */
 #define FC_SCALABLE        "scalable"          /* Bool */
+#define FC_COLOR           "color"             /* Bool */
 #define FC_SCALE           "scale"             /* double */
 #define FC_DPI             "dpi"               /* double */
 #define FC_RGBA                    "rgba"              /* Int */
@@ -112,7 +113,11 @@ typedef int                FcBool;
 #define FC_EMBEDDED_BITMAP  "embeddedbitmap"   /* Bool - true to enable embedded bitmaps */
 #define FC_DECORATIVE      "decorative"        /* Bool - true if style is a decorative variant */
 #define FC_LCD_FILTER      "lcdfilter"         /* Int */
+#define FC_FONT_FEATURES    "fontfeatures"     /* String */
 #define FC_NAMELANG        "namelang"          /* String RFC 3866 langs */
+#define FC_PRGNAME         "prgname"           /* String */
+#define FC_HASH                    "hash"              /* String (deprecated) */
+#define FC_POSTSCRIPT_NAME  "postscriptname"   /* String */
 
 #define FC_CACHE_SUFFIX                    ".cache-" FC_CACHE_VERSION
 #define FC_DIR_CACHE_FILE          "fonts.cache-" FC_CACHE_VERSION
@@ -127,6 +132,8 @@ typedef int         FcBool;
 #define FC_WEIGHT_EXTRALIGHT       40
 #define FC_WEIGHT_ULTRALIGHT       FC_WEIGHT_EXTRALIGHT
 #define FC_WEIGHT_LIGHT                    50
+#define FC_WEIGHT_DEMILIGHT        55
+#define FC_WEIGHT_SEMILIGHT        FC_WEIGHT_DEMILIGHT
 #define FC_WEIGHT_BOOK             75
 #define FC_WEIGHT_REGULAR          80
 #define FC_WEIGHT_NORMAL           FC_WEIGHT_REGULAR
@@ -181,6 +188,7 @@ typedef int         FcBool;
 #define FC_LCD_LEGACY      3
 
 typedef enum _FcType {
+    FcTypeUnknown = -1,
     FcTypeVoid,
     FcTypeInteger,
     FcTypeDouble,
@@ -189,7 +197,8 @@ typedef enum _FcType {
     FcTypeMatrix,
     FcTypeCharSet,
     FcTypeFTFace,
-    FcTypeLangSet
+    FcTypeLangSet,
+    FcTypeRange
 } FcType;
 
 typedef struct _FcMatrix {
@@ -226,6 +235,8 @@ typedef struct _FcPattern   FcPattern;
 
 typedef struct _FcLangSet   FcLangSet;
 
+typedef struct _FcRange            FcRange;
+
 typedef struct _FcValue {
     FcType     type;
     union {
@@ -237,6 +248,7 @@ typedef struct _FcValue {
        const FcCharSet *c;
        void            *f;
        const FcLangSet *l;
+       const FcRange   *r;
     } u;
 } FcValue;
 
@@ -417,6 +429,13 @@ FcConfigSubstitute (FcConfig       *config,
                    FcPattern   *p,
                    FcMatchKind kind);
 
+FcPublic const FcChar8 *
+FcConfigGetSysRoot (const FcConfig *config);
+
+FcPublic void
+FcConfigSetSysRoot (FcConfig      *config,
+                   const FcChar8 *sysroot);
+
 /* fccharset.c */
 FcPublic FcCharSet*
 FcCharSetCreate (void);
@@ -529,6 +548,9 @@ FcDirSave (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir);
 
 FcPublic FcCache *
 FcDirCacheLoad (const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file);
+
+FcPublic FcCache *
+FcDirCacheRescan (const FcChar8 *dir, FcConfig *config);
     
 FcPublic FcCache *
 FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config);
@@ -838,6 +860,9 @@ FcPatternAddBool (FcPattern *p, const char *object, FcBool b);
 FcPublic FcBool
 FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls);
 
+FcPublic FcBool
+FcPatternAddRange (FcPattern *p, const char *object, const FcRange *r);
+
 FcPublic FcResult
 FcPatternGetInteger (const FcPattern *p, const char *object, int n, int *i);
 
@@ -859,6 +884,9 @@ FcPatternGetBool (const FcPattern *p, const char *object, int n, FcBool *b);
 FcPublic FcResult
 FcPatternGetLangSet (const FcPattern *p, const char *object, int n, FcLangSet **ls);
 
+FcPublic FcResult
+FcPatternGetRange (const FcPattern *p, const char *object, int id, FcRange **r);
+
 FcPublic FcPattern *
 FcPatternVaBuild (FcPattern *p, va_list va);
     
@@ -868,6 +896,30 @@ FcPatternBuild (FcPattern *p, ...) FC_ATTRIBUTE_SENTINEL(0);
 FcPublic FcChar8 *
 FcPatternFormat (FcPattern *pat, const FcChar8 *format);
 
+/* fcrange.c */
+FcPublic FcRange *
+FcRangeCreateDouble (double begin, double end);
+
+FcPublic FcRange *
+FcRangeCreateInteger (FcChar32 begin, FcChar32 end);
+
+FcPublic void
+FcRangeDestroy (FcRange *range);
+
+FcPublic FcRange *
+FcRangeCopy (const FcRange *r);
+
+FcPublic FcBool
+FcRangeGetDouble(const FcRange *range, double *begin, double *end);
+
+/* fcweight.c */
+
+FcPublic int
+FcWeightFromOpenType (int ot_weight);
+
+FcPublic int
+FcWeightToOpenType (int fc_weight);
+
 /* fcstr.c */
 
 FcPublic FcChar8 *
@@ -962,6 +1014,9 @@ FcStrSetDestroy (FcStrSet *set);
 FcPublic FcStrList *
 FcStrListCreate (FcStrSet *set);
 
+FcPublic void
+FcStrListFirst (FcStrList *list);
+
 FcPublic FcChar8 *
 FcStrListNext (FcStrList *list);