Apply smack label for /opt/share/fonts path
[platform/upstream/fontconfig.git] / fontconfig / fontconfig.h
index 260955d..5c72b22 100644 (file)
@@ -51,8 +51,8 @@ typedef int           FcBool;
  */
 
 #define FC_MAJOR       2
-#define FC_MINOR       8
-#define FC_REVISION    0
+#define FC_MINOR       12
+#define FC_REVISION    1
 
 #define FC_VERSION     ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
 
@@ -66,7 +66,10 @@ typedef int          FcBool;
  * it means multiple copies of the font information.
  */
 
-#define FC_CACHE_VERSION    "3"
+#define FC_CACHE_VERSION_NUMBER        7
+#define _FC_STRINGIFY_(s)      #s
+#define _FC_STRINGIFY(s)       _FC_STRINGIFY_(s)
+#define FC_CACHE_VERSION       _FC_STRINGIFY(FC_CACHE_VERSION_NUMBER)
 
 #define FcTrue         1
 #define FcFalse                0
@@ -75,7 +78,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 */
@@ -85,15 +88,18 @@ typedef int         FcBool;
 #define FC_HINT_STYLE      "hintstyle"         /* Int */
 #define FC_VERTICAL_LAYOUT  "verticallayout"   /* Bool (false) */
 #define FC_AUTOHINT        "autohint"          /* Bool (false) */
+/* FC_GLOBAL_ADVANCE is deprecated. this is simply ignored on freetype 2.4.5 or later */
 #define FC_GLOBAL_ADVANCE   "globaladvance"    /* Bool (true) */
 #define FC_WIDTH           "width"             /* Int */
 #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_SCALE           "scale"             /* double */
+#define FC_COLOR           "color"             /* Bool */
+#define FC_SCALE           "scale"             /* double (deprecated) */
+#define FC_SYMBOL          "symbol"            /* Bool */
 #define FC_DPI             "dpi"               /* double */
 #define FC_RGBA                    "rgba"              /* Int */
 #define FC_MINSPACE        "minspace"          /* Bool use minimum line spacing */
@@ -111,10 +117,15 @@ 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
-#define FC_USER_CACHE_FILE         ".fonts.cache-"FC_CACHE_VERSION
+#define FC_CACHE_SUFFIX                    ".cache-" FC_CACHE_VERSION
+#define FC_DIR_CACHE_FILE          "fonts.cache-" FC_CACHE_VERSION
+#define FC_USER_CACHE_FILE         ".fonts.cache-" FC_CACHE_VERSION
 
 /* Adjust outline rasterizer */
 #define FC_CHAR_WIDTH      "charwidth" /* Int */
@@ -125,6 +136,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
@@ -179,15 +192,17 @@ typedef int               FcBool;
 #define FC_LCD_LEGACY      3
 
 typedef enum _FcType {
-    FcTypeVoid, 
-    FcTypeInteger, 
-    FcTypeDouble, 
-    FcTypeString, 
+    FcTypeUnknown = -1,
+    FcTypeVoid,
+    FcTypeInteger,
+    FcTypeDouble,
+    FcTypeString,
     FcTypeBool,
     FcTypeMatrix,
     FcTypeCharSet,
     FcTypeFTFace,
-    FcTypeLangSet
+    FcTypeLangSet,
+    FcTypeRange
 } FcType;
 
 typedef struct _FcMatrix {
@@ -205,7 +220,7 @@ typedef struct _FcMatrix {
 typedef struct _FcCharSet FcCharSet;
 
 typedef struct _FcObjectType {
-    const char *object;
+    char       *object;
     FcType     type;
 } FcObjectType;
 
@@ -224,6 +239,8 @@ typedef struct _FcPattern   FcPattern;
 
 typedef struct _FcLangSet   FcLangSet;
 
+typedef struct _FcRange            FcRange;
+
 typedef struct _FcValue {
     FcType     type;
     union {
@@ -235,6 +252,7 @@ typedef struct _FcValue {
        const FcCharSet *c;
        void            *f;
        const FcLangSet *l;
+       const FcRange   *r;
     } u;
 } FcValue;
 
@@ -328,6 +346,12 @@ FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config);
 FcPublic FcBool
 FcDirCacheValid (const FcChar8 *cache_file);
 
+FcPublic FcBool
+FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose);
+
+FcPublic void
+FcCacheCreateTagFile (const FcConfig *config);
+
 /* fccfg.c */
 FcPublic FcChar8 *
 FcConfigHome (void);
@@ -375,7 +399,7 @@ FcPublic FcBlanks *
 FcConfigGetBlanks (FcConfig *config);
 
 FcPublic FcStrList *
-FcConfigGetCacheDirs (FcConfig *config);
+FcConfigGetCacheDirs (const FcConfig   *config);
 
 FcPublic int
 FcConfigGetRescanInterval (FcConfig *config);
@@ -409,6 +433,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);
@@ -416,7 +447,7 @@ FcCharSetCreate (void);
 /* deprecated alias for FcCharSetCreate */
 FcPublic FcCharSet *
 FcCharSetNew (void);
-    
+
 FcPublic void
 FcCharSetDestroy (FcCharSet *fcs);
 
@@ -490,6 +521,9 @@ FcPublic void
 FcFontSetPrint (const FcFontSet *s);
 
 /* fcdefault.c */
+FcPublic FcStrSet *
+FcGetDefaultLangs (void);
+
 FcPublic void
 FcDefaultSubstitute (FcPattern *pattern);
 
@@ -518,6 +552,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);
@@ -569,6 +606,9 @@ FcInitBringUptoDate (void);
 FcPublic FcStrSet *
 FcGetLangs (void);
 
+FcPublic FcChar8 *
+FcLangNormalize (const FcChar8 *lang);
+
 FcPublic const FcCharSet *
 FcLangGetCharSet (const FcChar8 *lang);
 
@@ -584,6 +624,9 @@ FcLangSetCopy (const FcLangSet *ls);
 FcPublic FcBool
 FcLangSetAdd (FcLangSet *ls, const FcChar8 *lang);
 
+FcPublic FcBool
+FcLangSetDel (FcLangSet *ls, const FcChar8 *lang);
+
 FcPublic FcLangResult
 FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang);
 
@@ -602,6 +645,12 @@ FcLangSetHash (const FcLangSet *ls);
 FcPublic FcStrSet *
 FcLangSetGetLangs (const FcLangSet *ls);
 
+FcPublic FcLangSet *
+FcLangSetUnion (const FcLangSet *a, const FcLangSet *b);
+
+FcPublic FcLangSet *
+FcLangSetSubtract (const FcLangSet *a, const FcLangSet *b);
+
 /* fclist.c */
 FcPublic FcObjectSet *
 FcObjectSetCreate (void);
@@ -714,26 +763,30 @@ FcMatrixShear (FcMatrix *m, double sh, double sv);
 
 /* fcname.c */
 
+/* Deprecated.  Does nothing.  Returns FcFalse. */
 FcPublic FcBool
 FcNameRegisterObjectTypes (const FcObjectType *types, int ntype);
 
+/* Deprecated.  Does nothing.  Returns FcFalse. */
 FcPublic FcBool
 FcNameUnregisterObjectTypes (const FcObjectType *types, int ntype);
-    
+
 FcPublic const FcObjectType *
 FcNameGetObjectType (const char *object);
 
+/* Deprecated.  Does nothing.  Returns FcFalse. */
 FcPublic FcBool
 FcNameRegisterConstants (const FcConstant *consts, int nconsts);
 
+/* Deprecated.  Does nothing.  Returns FcFalse. */
 FcPublic FcBool
 FcNameUnregisterConstants (const FcConstant *consts, int nconsts);
-    
+
 FcPublic const FcConstant *
-FcNameGetConstant (FcChar8 *string);
+FcNameGetConstant (const FcChar8 *string);
 
 FcPublic FcBool
-FcNameConstant (FcChar8 *string, int *result);
+FcNameConstant (const FcChar8 *string, int *result);
 
 FcPublic FcPattern *
 FcNameParse (const FcChar8 *name);
@@ -811,6 +864,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);
 
@@ -832,6 +888,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);
     
@@ -841,6 +900,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 *
@@ -935,6 +1018,9 @@ FcStrSetDestroy (FcStrSet *set);
 FcPublic FcStrList *
 FcStrListCreate (FcStrSet *set);
 
+FcPublic void
+FcStrListFirst (FcStrList *list);
+
 FcPublic FcChar8 *
 FcStrListNext (FcStrList *list);