]> www.fi.muni.cz Git - evince.git/blob - pdf/splash/SplashFTFont.h
Import of xpdf code from gpdf.
[evince.git] / pdf / splash / SplashFTFont.h
1 //========================================================================
2 //
3 // SplashFTFont.h
4 //
5 //========================================================================
6
7 #ifndef SPLASHFTFONT_H
8 #define SPLASHFTFONT_H
9
10 #include <aconf.h>
11
12 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
13
14 #ifdef USE_GCC_PRAGMAS
15 #pragma interface
16 #endif
17
18 #include <ft2build.h>
19 #include FT_FREETYPE_H
20 #include "SplashFont.h"
21
22 class SplashFTFontFile;
23
24 //------------------------------------------------------------------------
25 // SplashFTFont
26 //------------------------------------------------------------------------
27
28 class SplashFTFont: public SplashFont {
29 public:
30
31   SplashFTFont(SplashFTFontFile *fontFileA, SplashCoord *matA);
32
33   virtual ~SplashFTFont();
34
35   // Munge xFrac and yFrac before calling SplashFont::getGlyph.
36   virtual GBool getGlyph(int c, int xFrac, int yFrac,
37                          SplashGlyphBitmap *bitmap);
38
39   // Rasterize a glyph.  The <xFrac> and <yFrac> values are the same
40   // as described for getGlyph.
41   virtual GBool makeGlyph(int c, int xFrac, int yFrac,
42                           SplashGlyphBitmap *bitmap);
43
44   // Return the path for a glyph.
45   virtual SplashPath *getGlyphPath(int c);
46
47 private:
48
49   FT_Size sizeObj;
50   FT_Matrix matrix;
51 };
52
53 #endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
54
55 #endif