]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/xpdf/T1Font.h
Reused eog HIG dialog in GPdf.
[evince.git] / pdf / xpdf / T1Font.h
index 6c1e8f81f7af53f72986ee2739afda0862439b07..416f5337b0327a4c7ca83ed282624306136897f9 100644 (file)
@@ -4,14 +4,18 @@
 //
 // 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();
 
@@ -37,6 +41,8 @@ private:
   GBool aaHigh;                        // use high-res anti-aliasing?
   GBool ok;
 
+  static int t1libInitCount;
+
   friend class T1FontFile;
   friend class T1Font;
 };
@@ -46,8 +52,8 @@ private:
 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();
 
@@ -57,6 +63,7 @@ private:
   int id;                      // t1lib font ID
   char **enc;
   char *encStr;
+  double bbox[4];
   GBool ok;
 
   friend class T1Font;
@@ -73,15 +80,18 @@ struct T1FontCacheTag {
 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;