1 //======================================================================== 2 // 3 // SplashT1Font.h 4 // 5 //======================================================================== 6 7 //======================================================================== 8 // 9 // Modified under the Poppler project - http://poppler.freedesktop.org 10 // 11 // All changes made under the Poppler project to this file are licensed 12 // under GPL version 2 or later 13 // 14 // Copyright (C) 2007 Albert Astals Cid <aacid@kde.org> 15 // 16 // To see a description of the changes please see the Changelog file that 17 // came with your tarball or type make ChangeLog if you are building from git 18 // 19 //======================================================================== 20 21 #ifndef SPLASHT1FONT_H 22 #define SPLASHT1FONT_H 23 24 #if HAVE_T1LIB_H 25 26 #ifdef USE_GCC_PRAGMAS 27 #pragma interface 28 #endif 29 30 #include "SplashFont.h" 31 32 class SplashT1FontFile; 33 34 //------------------------------------------------------------------------ 35 // SplashT1Font 36 //------------------------------------------------------------------------ 37 38 class SplashT1Font: public SplashFont { 39 public: 40 41 SplashT1Font(SplashT1FontFile *fontFileA, SplashCoord *matA, 42 SplashCoord *textMatA); 43 44 virtual ~SplashT1Font(); 45 46 // Munge xFrac and yFrac before calling SplashFont::getGlyph. 47 virtual GBool getGlyph(int c, int xFrac, int yFrac, 48 SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes); 49 50 // Rasterize a glyph. The <xFrac> and <yFrac> values are the same 51 // as described for getGlyph. 52 virtual GBool makeGlyph(int c, int xFrac, int yFrac, 53 SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes); 54 55 // Return the path for a glyph. 56 virtual SplashPath *getGlyphPath(int c); 57 58 private: 59 60 int t1libID; // t1lib font ID 61 int outlineID; // t1lib font ID for glyph outlines 62 float size; 63 float outlineSize; // size for glyph outlines 64 float outlineMul; 65 }; 66 67 #endif // HAVE_T1LIB_H 68 69 #endif 70