16#if FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
22#include <freetype/freetype.h>
28class FTFontEngine: public SFontEngine {
31 FTFontEngine(Display *displayA, Visual *visualA, int depthA,
32 Colormap colormapA, GBool aaA);
33 GBool isOk() { return ok; }
34 virtual ~FTFontEngine();
43 friend class FTFontFile;
52 ftFontModeCharCodeOffset,
54 ftFontModeCodeMapDirect,
55 ftFontModeCIDToGIDMap,
59class FTFontFile: public SFontFile {
63 FTFontFile(FTFontEngine *engineA, char *fontFileName,
64 char **fontEnc, GBool pdfFontHasEncoding);
67 FTFontFile(FTFontEngine *engineA, char *fontFileName,
68 Gushort *cidToGIDA, int cidToGIDLenA);
71 FTFontFile(FTFontEngine *engineA, char *fontFileName);
73 GBool isOk() { return ok; }
74 virtual ~FTFontFile();
92struct FTFontCacheTag {
98class FTFont: public SFont {
101 FTFont(FTFontFile *fontFileA, double *m);
102 GBool isOk() { return ok; }
104 virtual GBool drawChar(Drawable d, int w, int h, GC gc,
105 int x, int y, int r, int g, int b,
106 CharCode c, Unicode u);
107 virtual GBool getCharPath(CharCode c, Unicode u, GfxState *state);
111 Guchar *getGlyphPixmap(CharCode c, Unicode u,
112 int *x, int *y, int *w, int *h);
113 static int charPathMoveTo(FT_Vector *pt, void *state);
114 static int charPathLineTo(FT_Vector *pt, void *state);
115 static int charPathConicTo(FT_Vector *ctrl, FT_Vector *pt, void *state);
116 static int charPathCubicTo(FT_Vector *ctrl1, FT_Vector *ctrl2,
117 FT_Vector *pt, void *state);
118 FT_UInt getGlyphIndex(CharCode c, Unicode u);
120 FTFontFile *fontFile;
127 FTFontCacheTag *cacheTags;
|