/*
- * $XFree86: $
+ * $XFree86: xc/lib/fontconfig/fontconfig/fcfreetype.h,v 1.2 2002/02/15 06:01:27 keithp Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
FcCharSet *
FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks);
+FcResult
+FcPatternGetFTFace (FcPattern *p, const char *object, int n, FT_Face *f);
+
+FcBool
+FcPatternAddFTFace (FcPattern *p, const char *object, const FT_Face f);
+
#endif
/*
- * $XFree86: $
+ * $XFree86: xc/lib/fontconfig/fontconfig/fcprivate.h,v 1.2 2002/02/15 06:01:27 keithp Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
case FcTypeCharSet: \
__v__.u.c = va_arg (va, FcCharSet *); \
break; \
+ case FcTypeFTFace: \
+ __v__.u.f = va_arg (va, FT_Face); \
} \
if (!FcPatternAdd (__p__, __o__, __v__, FcTrue)) \
goto _FcPatternVapBuild_bail1; \
/*
- * $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.12 2002/05/29 08:21:33 keithp Exp $
+ * $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.
*
#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 */
FcTypeString,
FcTypeBool,
FcTypeMatrix,
- FcTypeCharSet
+ FcTypeCharSet,
+ FcTypeFTFace
} FcType;
typedef struct _FcMatrix {
double d;
const FcMatrix *m;
const FcCharSet *c;
+ void *f;
} u;
} FcValue;
/*
- * $XFree86: xc/lib/fontconfig/src/fccharset.c,v 1.9 2002/05/29 22:07:33 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fccharset.c,v 1.10 2002/05/31 04:42:42 keithp Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
return FcTrue;
}
-#include <freetype/freetype.h>
-#include <fontconfig/fcfreetype.h>
-
/*
* Figure out whether the available freetype has FT_Get_Next_Char
*/
#include <freetype/freetype.h>
#include <freetype/internal/ftobjs.h>
#include <freetype/tttables.h>
-#include <fontconfig/fcfreetype.h>
static const struct {
int bit;
/*
- * $XFree86: xc/lib/fontconfig/src/fcint.h,v 1.10 2002/05/29 22:07:33 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcint.h,v 1.11 2002/05/31 04:42:42 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
#include <time.h>
#include <fontconfig/fontconfig.h>
#include <fontconfig/fcprivate.h>
+#include <fontconfig/fcfreetype.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/*
- * $XFree86: xc/lib/fontconfig/src/fcpat.c,v 1.4 2002/05/22 04:12:35 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcpat.c,v 1.5 2002/05/29 22:07:33 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
return FcMatrixEqual (va.u.m, vb.u.m);
case FcTypeCharSet:
return FcCharSetEqual (va.u.c, vb.u.c);
+ case FcTypeFTFace:
+ return va.u.f == vb.u.f;
}
return FcFalse;
}
return FcPatternAdd (p, object, v, FcTrue);
}
+FcBool
+FcPatternAddFTFace (FcPattern *p, const char *object, const FT_Face f)
+{
+ FcValue v;
+
+ v.type = FcTypeFTFace;
+ v.u.f = (void *) f;
+ return FcPatternAdd (p, object, v, FcTrue);
+}
+
FcResult
FcPatternGet (FcPattern *p, const char *object, int id, FcValue *v)
{
return FcResultMatch;
}
+FcResult
+FcPatternGetFTFace (FcPattern *p, const char *object, int id, FT_Face *f)
+{
+ FcValue v;
+ FcResult r;
+
+ r = FcPatternGet (p, object, id, &v);
+ if (r != FcResultMatch)
+ return r;
+ if (v.type != FcTypeFTFace)
+ return FcResultTypeMismatch;
+ *f = (FT_Face) v.u.f;
+ return FcResultMatch;
+}
+
FcPattern *
FcPatternDuplicate (FcPattern *orig)
{