//
// An X wrapper for the t1lib Type 1 font rasterizer.
//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
//========================================================================
#ifndef T1FONT_H
#define T1FONT_H
+#include <aconf.h>
+
#if HAVE_T1LIB_H
-#ifdef __GNUC__
+#ifdef USE_GCC_PRAGMAS
#pragma interface
#endif
#include <t1lib.h>
#include "SFont.h"
-class FontEncoding;
+class GfxState;
//------------------------------------------------------------------------
class T1FontEngine: public SFontEngine {
public:
- T1FontEngine(Display *display, Visual *visual, int depth,
- Colormap colormap, GBool aa, GBool aaHigh);
+ T1FontEngine(Display *displayA, Visual *visualA, int depthA,
+ Colormap colormapA, GBool aaA, GBool aaHighA);
GBool isOk() { return ok; }
virtual ~T1FontEngine();
GBool aaHigh; // use high-res anti-aliasing?
GBool ok;
+ static int t1libInitCount;
+
friend class T1FontFile;
friend class T1Font;
};
class T1FontFile: public SFontFile {
public:
- T1FontFile(T1FontEngine *engine, char *fontFileName,
- FontEncoding *fontEnc);
+ T1FontFile(T1FontEngine *engineA, char *fontFileName,
+ char **fontEnc, double *bboxA);
GBool isOk() { return ok; }
virtual ~T1FontFile();
int id; // t1lib font ID
char **enc;
char *encStr;
+ double bbox[4];
GBool ok;
friend class T1Font;
class T1Font: public SFont {
public:
- T1Font(T1FontFile *fontFile, double *m);
+ T1Font(T1FontFile *fontFileA, double *m);
GBool isOk() { return ok; }
virtual ~T1Font();
virtual GBool drawChar(Drawable d, int w, int h, GC gc,
- int x, int y, int r, int g, int b, Gushort c);
+ int x, int y, int r, int g, int b,
+ CharCode c, Unicode u);
+ virtual GBool getCharPath(CharCode c, Unicode u, GfxState *state);
private:
- Guchar *getGlyphPixmap(Gushort c, int *x, int *y, int *w, int *h);
+ Guchar *getGlyphPixmap(CharCode c, int *x, int *y, int *w, int *h,
+ GBool *tempBitmap);
T1FontFile *fontFile;
int id;