]> git.wh0rd.org - fontconfig.git/blobdiff - fontconfig/fontconfig.h
Add support for user-provided freetype faces to Xft
[fontconfig.git] / fontconfig / fontconfig.h
index c7105e0d1c28f5c93fc516c2a350347b3d522d3f..fa1d0e81ebe775a0e62ba9c207c2ce35c4bec3d9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $XFree86: $
+ * $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.13 2002/05/31 04:42:42 keithp Exp $
  *
  * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -37,7 +37,7 @@ typedef int           FcBool;
  */
 #define FC_MAJOR       1
 #define FC_MINOR       0
-#define FC_REVISION    0
+#define FC_REVISION    1
 
 #define FC_VERSION     ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
 
@@ -59,6 +59,7 @@ typedef int           FcBool;
 #define FC_GLOBAL_ADVANCE   "globaladvance"    /* Bool (true) */
 #define FC_FILE                    "file"              /* String */
 #define FC_INDEX           "index"             /* Int */
+#define FC_FT_FACE         "ftface"            /* FT_Face */
 #define FC_RASTERIZER      "rasterizer"        /* String */
 #define FC_OUTLINE         "outline"           /* Bool */
 #define FC_SCALABLE        "scalable"          /* Bool */
@@ -145,7 +146,8 @@ typedef enum _FcType {
     FcTypeString, 
     FcTypeBool,
     FcTypeMatrix,
-    FcTypeCharSet
+    FcTypeCharSet,
+    FcTypeFTFace
 } FcType;
 
 typedef struct _FcMatrix {
@@ -168,7 +170,7 @@ typedef struct _FcObjectType {
 } FcObjectType;
 
 typedef struct _FcConstant {
-    const char  *name;
+    const FcChar8  *name;
     const char *object;
     int                value;
 } FcConstant;
@@ -186,6 +188,7 @@ typedef struct _FcValue {
        double          d;
        const FcMatrix  *m;
        const FcCharSet *c;
+       void            *f;
     } u;
 } FcValue;
 
@@ -212,6 +215,8 @@ typedef enum _FcSetName {
     FcSetApplication = 1
 } FcSetName;
 
+typedef struct _FcAtomic FcAtomic;
+
 #if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
 #define _FCFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
 #define _FCFUNCPROTOEND }
@@ -226,6 +231,10 @@ typedef struct _FcFileCache FcFileCache;
 
 typedef struct _FcBlanks    FcBlanks;
 
+typedef struct _FcStrList   FcStrList;
+
+typedef struct _FcStrSet    FcStrSet;
+
 _FCFUNCPROTOBEGIN
 
 /* fcblanks.c */
@@ -242,8 +251,8 @@ FcBool
 FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4);
 
 /* fccfg.c */
-char *
-FcConfigFilename (const char *url);
+FcChar8 *
+FcConfigFilename (const FcChar8 *url);
     
 FcConfig *
 FcConfigCreate (void);
@@ -257,32 +266,44 @@ FcConfigSetCurrent (FcConfig *config);
 FcConfig *
 FcConfigGetCurrent (void);
 
+FcBool
+FcConfigUptoDate (FcConfig *config);
+    
 FcBool
 FcConfigBuildFonts (FcConfig *config);
 
-char **
-FcConfigGetDirs (FcConfig   *config);
+FcStrList *
+FcConfigGetFontDirs (FcConfig   *config);
 
-char **
+FcStrList *
+FcConfigGetConfigDirs (FcConfig   *config);
+
+FcStrList *
 FcConfigGetConfigFiles (FcConfig    *config);
 
-char *
+FcChar8 *
 FcConfigGetCache (FcConfig  *config);
 
 FcBlanks *
 FcConfigGetBlanks (FcConfig *config);
 
+int
+FcConfigGetRescanInverval (FcConfig *config);
+
+FcBool
+FcConfigSetRescanInverval (FcConfig *config, int rescanInterval);
+
 FcFontSet *
 FcConfigGetFonts (FcConfig     *config,
                  FcSetName     set);
 
 FcBool
 FcConfigAppFontAddFile (FcConfig    *config,
-                       const char  *file);
+                       const FcChar8  *file);
 
 FcBool
 FcConfigAppFontAddDir (FcConfig            *config,
-                      const char   *dir);
+                      const FcChar8   *dir);
 
 void
 FcConfigAppFontClear (FcConfig     *config);
@@ -329,34 +350,63 @@ FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b);
 FcChar32
 FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b);
 
-#ifndef FONTCONFIG_NO_FREETYPE
-#include <freetype/freetype.h>
-FT_UInt
-FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4);
-#endif
+FcBool
+FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b);
+
+#define FC_CHARSET_MAP_SIZE (256/32)
+#define FC_CHARSET_DONE        ((FcChar32) -1)
+
+FcChar32
+FcCharSetFirstPage (const FcCharSet *a, 
+                   FcChar32        map[FC_CHARSET_MAP_SIZE],
+                   FcChar32        *next);
+
+FcChar32
+FcCharSetNextPage (const FcCharSet  *a, 
+                  FcChar32         map[FC_CHARSET_MAP_SIZE],
+                  FcChar32         *next);
+
 
 /* fcdbg.c */
+void
+FcValuePrint (FcValue v);
+
 void
 FcPatternPrint (FcPattern *p);
 
+void
+FcFontSetPrint (FcFontSet *s);
+
 /* fcdefault.c */
 void
 FcDefaultSubstitute (FcPattern *pattern);
 
 /* fcdir.c */
 FcBool
-FcDirScan (FcFontSet   *set,
-          FcFileCache  *cache,
-          FcBlanks     *blanks,
-          const char   *dir,
-          FcBool       force);
+FcFileScan (FcFontSet      *set,
+           FcStrSet        *dirs,
+           FcFileCache     *cache,
+           FcBlanks        *blanks,
+           const FcChar8   *file,
+           FcBool          force);
 
 FcBool
-FcDirSave (FcFontSet *set, const char *dir);
+FcDirScan (FcFontSet       *set,
+          FcStrSet         *dirs,
+          FcFileCache      *cache,
+          FcBlanks         *blanks,
+          const FcChar8    *dir,
+          FcBool           force);
+
+FcBool
+FcDirSave (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir);
+
+FcBool
+FcDirCacheValid (const FcChar8 *dir);
 
 /* fcfreetype.c */
 FcPattern *
-FcFreeTypeQuery (const char *file, int id, FcBlanks *blanks, int *count);
+FcFreeTypeQuery (const FcChar8 *file, int id, FcBlanks *blanks, int *count);
 
 /* fcfs.c */
 
@@ -370,14 +420,23 @@ FcBool
 FcFontSetAdd (FcFontSet *s, FcPattern *font);
 
 /* fcinit.c */
+FcConfig *
+FcInitLoadConfig (void);
+
+FcConfig *
+FcInitLoadConfigAndFonts (void);
+
 FcBool
-FcInitFonts (void);
+FcInit (void);
+
+int
+FcGetVersion (void);
 
 FcBool
-FcInitConfig (void);
+FcInitReinitialize (void);
 
 FcBool
-FcInit (void);
+FcInitBringUptoDate (void);
 
 /* fclist.c */
 FcObjectSet *
@@ -395,17 +454,81 @@ FcObjectSetVaBuild (const char *first, va_list va);
 FcObjectSet *
 FcObjectSetBuild (const char *first, ...);
 
+FcFontSet *
+FcFontSetList (FcConfig            *config,
+              FcFontSet    **sets,
+              int          nsets,
+              FcPattern    *p,
+              FcObjectSet  *os);
+
 FcFontSet *
 FcFontList (FcConfig   *config,
            FcPattern   *p,
            FcObjectSet *os);
 
+/* fcatomic.c */
+
+FcAtomic *
+FcAtomicCreate (const FcChar8   *file);
+
+FcBool
+FcAtomicLock (FcAtomic *atomic);
+
+FcChar8 *
+FcAtomicNewFile (FcAtomic *atomic);
+
+FcChar8 *
+FcAtomicOrigFile (FcAtomic *atomic);
+
+FcBool
+FcAtomicReplaceOrig (FcAtomic *atomic);
+
+void
+FcAtomicDeleteNew (FcAtomic *atomic);
+
+void
+FcAtomicUnlock (FcAtomic *atomic);
+
+void
+FcAtomicDestroy (FcAtomic *atomic);
+
 /* fcmatch.c */
+FcPattern *
+FcFontSetMatch (FcConfig    *config,
+               FcFontSet   **sets,
+               int         nsets,
+               FcPattern   *p,
+               FcResult    *result);
+
 FcPattern *
 FcFontMatch (FcConfig  *config,
             FcPattern  *p, 
             FcResult   *result);
 
+FcPattern *
+FcFontRenderPrepare (FcConfig      *config,
+                    FcPattern      *pat,
+                    FcPattern      *font);
+
+FcFontSet *
+FcFontSetSort (FcConfig            *config,
+              FcFontSet    **sets,
+              int          nsets,
+              FcPattern    *p,
+              FcBool       trim,
+              FcCharSet    **csp,
+              FcResult     *result);
+
+FcFontSet *
+FcFontSort (FcConfig    *config,
+           FcPattern    *p,
+           FcBool       trim,
+           FcCharSet    **csp,
+           FcResult     *result);
+
+void
+FcFontSetSortDestroy (FcFontSet *fs);
+
 /* fcmatrix.c */
 FcMatrix *
 FcMatrixCopy (const FcMatrix *mat);
@@ -443,13 +566,13 @@ FcBool
 FcNameUnregisterConstants (const FcConstant *consts, int nconsts);
     
 const FcConstant *
-FcNameGetConstant (char *string);
+FcNameGetConstant (FcChar8 *string);
 
 FcBool
-FcNameConstant (char *string, int *result);
+FcNameConstant (FcChar8 *string, int *result);
 
 FcPattern *
-FcNameParse (const char *name);
+FcNameParse (const FcChar8 *name);
 
 FcChar8 *
 FcNameUnparse (FcPattern *pat);
@@ -464,12 +587,18 @@ FcPatternDuplicate (FcPattern *p);
 void
 FcValueDestroy (FcValue v);
 
+FcBool
+FcValueEqual (FcValue va, FcValue vb);
+
 FcValue
 FcValueSave (FcValue v);
 
 void
 FcPatternDestroy (FcPattern *p);
 
+FcBool
+FcPatternEqual (FcPattern *pa, FcPattern *pb);
+
 FcBool
 FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append);
     
@@ -486,7 +615,7 @@ FcBool
 FcPatternAddDouble (FcPattern *p, const char *object, double d);
 
 FcBool
-FcPatternAddString (FcPattern *p, const char *object, const char *s);
+FcPatternAddString (FcPattern *p, const char *object, const FcChar8 *s);
 
 FcBool
 FcPatternAddMatrix (FcPattern *p, const char *object, const FcMatrix *s);
@@ -504,7 +633,7 @@ FcResult
 FcPatternGetDouble (FcPattern *p, const char *object, int n, double *d);
 
 FcResult
-FcPatternGetString (FcPattern *p, const char *object, int n, char **const s);
+FcPatternGetString (FcPattern *p, const char *object, int n, FcChar8 ** s);
 
 FcResult
 FcPatternGetMatrix (FcPattern *p, const char *object, int n, FcMatrix **s);
@@ -523,13 +652,19 @@ FcPatternBuild (FcPattern *orig, ...);
 
 /* fcstr.c */
 
-char *
-FcStrCopy (const char *s);
+FcChar8 *
+FcStrCopy (const FcChar8 *s);
 
+FcChar8 *
+FcStrCopyFilename (const FcChar8 *s);
+    
 #define FcToLower(c)   (('A' <= (c) && (c) <= 'Z') ? (c) - 'A' + 'a' : (c))
 
 int
-FcStrCmpIgnoreCase (const char *s1, const char *s2);
+FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
+
+int
+FcStrCmp (const FcChar8 *s1, const FcChar8 *s2);
 
 int
 FcUtf8ToUcs4 (FcChar8   *src_orig,
@@ -542,9 +677,42 @@ FcUtf8Len (FcChar8 *string,
           int          *nchar,
           int          *wchar);
 
+FcChar8 *
+FcStrDirname (const FcChar8 *file);
+
+FcChar8 *
+FcStrBasename (const FcChar8 *file);
+
+FcStrSet *
+FcStrSetCreate (void);
+
+FcBool
+FcStrSetMember (FcStrSet *set, const FcChar8 *s);
+
+FcBool
+FcStrSetAdd (FcStrSet *set, const FcChar8 *s);
+
+FcBool
+FcStrSetAddFilename (FcStrSet *set, const FcChar8 *s);
+
+FcBool
+FcStrSetDel (FcStrSet *set, const FcChar8 *s);
+
+void
+FcStrSetDestroy (FcStrSet *set);
+
+FcStrList *
+FcStrListCreate (FcStrSet *set);
+
+FcChar8 *
+FcStrListNext (FcStrList *list);
+
+void
+FcStrListDone (FcStrList *list);
+
 /* fcxml.c */
 FcBool
-FcConfigParseAndLoad (FcConfig *config, const char *file, FcBool complain);
+FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain);
 
 _FCFUNCPROTOEND