Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdf/xpdf/TTFont.h
diff options
context:
space:
mode:
authorMartin Kretzschmar <mkretzschmar@src.gnome.org>2002-09-18 22:20:42 (GMT)
committer Martin Kretzschmar <mkretzschmar@src.gnome.org>2002-09-18 22:20:42 (GMT)
commit2a393c134fe3fe8eb85bf818cb7ad6ae4396322a (patch)
treeeba8b0dcaba42d799ed8313faee15fb74a5a0cd2 /pdf/xpdf/TTFont.h
parent7aac8dc8533347e21311b15186e0af82f1b22fd6 (diff)
Synched with Xpdf 1.01
Diffstat (limited to 'pdf/xpdf/TTFont.h')
-rw-r--r--pdf/xpdf/TTFont.h39
1 files changed, 31 insertions, 8 deletions
diff --git a/pdf/xpdf/TTFont.h b/pdf/xpdf/TTFont.h
index 36196d2..b4ebd96 100644
--- a/pdf/xpdf/TTFont.h
+++ b/pdf/xpdf/TTFont.h
@@ -4,12 +4,14 @@
//
// An X wrapper for the FreeType TrueType font rasterizer.
//
+// Copyright 2001-2002 Glyph & Cog, LLC
+//
//========================================================================
#ifndef TTFONT_H
#define TTFONT_H
-#if HAVE_FREETYPE_FREETYPE_H | HAVE_FREETYPE_H
+#if !FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
#ifdef __GNUC__
#pragma interface
@@ -22,6 +24,7 @@
#include <freetype.h>
#include <ftxpost.h>
#endif
+#include "gtypes.h"
#include "SFont.h"
//------------------------------------------------------------------------
@@ -29,8 +32,8 @@
class TTFontEngine: public SFontEngine {
public:
- TTFontEngine(Display *display, Visual *visual, int depth,
- Colormap colormap, GBool aa);
+ TTFontEngine(Display *displayA, Visual *visualA, int depthA,
+ Colormap colormapA, GBool aaA);
GBool isOk() { return ok; }
virtual ~TTFontEngine();
@@ -47,10 +50,25 @@ private:
//------------------------------------------------------------------------
+enum TTFontIndexMode {
+ ttFontModeUnicode,
+ ttFontModeCharCode,
+ ttFontModeCharCodeOffset,
+ ttFontModeCodeMap,
+ ttFontModeCIDToGIDMap
+};
+
class TTFontFile: public SFontFile {
public:
- TTFontFile(TTFontEngine *engine, char *fontFileName);
+ // 8-bit font, TrueType or Type 1/1C
+ TTFontFile(TTFontEngine *engineA, char *fontFileName,
+ char **fontEnc, GBool pdfFontHasEncoding);
+
+ // CID font, TrueType
+ TTFontFile(TTFontEngine *engineA, char *fontFileName,
+ Gushort *cidToGIDA, int cidToGIDLenA);
+
GBool isOk() { return ok; }
virtual ~TTFontFile();
@@ -59,7 +77,11 @@ private:
TTFontEngine *engine;
TT_Face face;
TT_CharMap charMap;
+ TTFontIndexMode mode;
int charMapOffset;
+ Guchar *codeMap;
+ Gushort *cidToGID;
+ int cidToGIDLen;
GBool ok;
friend class TTFont;
@@ -75,15 +97,16 @@ struct TTFontCacheTag {
class TTFont: public SFont {
public:
- TTFont(TTFontFile *fontFile, double *m);
+ TTFont(TTFontFile *fontFileA, double *m);
GBool isOk() { return ok; }
virtual ~TTFont();
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);
private:
- GBool getGlyphPixmap(Gushort c);
+ GBool getGlyphPixmap(CharCode c, Unicode u);
TTFontFile *fontFile;
TT_Instance instance;
@@ -99,6 +122,6 @@ private:
GBool ok;
};
-#endif // HAVE_FREETYPE_FREETYPE_H | HAVE_FREETYPE_H
+#endif // !FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
#endif