beta-0.89.2
[luatex.git] / source / libs / poppler / poppler-src / splash / SplashFTFont.h
blob98cb29dfbba5a33324446b014586aff99c852c8f
1 //========================================================================
2 //
3 // SplashFTFont.h
4 //
5 //========================================================================
7 //========================================================================
8 //
9 // Modified under the Poppler project - http://poppler.freedesktop.org
11 // All changes made under the Poppler project to this file are licensed
12 // under GPL version 2 or later
14 // Copyright (C) 2007-2009, 2011 Albert Astals Cid <aacid@kde.org>
15 // Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
16 // Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com>
18 // To see a description of the changes please see the Changelog file that
19 // came with your tarball or type make ChangeLog if you are building from git
21 //========================================================================
23 #ifndef SPLASHFTFONT_H
24 #define SPLASHFTFONT_H
26 #include "poppler-config.h"
28 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
30 #ifdef USE_GCC_PRAGMAS
31 #pragma interface
32 #endif
34 #include <ft2build.h>
35 #include FT_FREETYPE_H
36 #include "SplashFont.h"
38 class SplashFTFontFile;
40 //------------------------------------------------------------------------
41 // SplashFTFont
42 //------------------------------------------------------------------------
44 class SplashFTFont: public SplashFont {
45 public:
47 SplashFTFont(SplashFTFontFile *fontFileA, SplashCoord *matA,
48 SplashCoord *textMatA);
50 virtual ~SplashFTFont();
52 // Munge xFrac and yFrac before calling SplashFont::getGlyph.
53 virtual GBool getGlyph(int c, int xFrac, int yFrac,
54 SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes);
56 // Rasterize a glyph. The <xFrac> and <yFrac> values are the same
57 // as described for getGlyph.
58 virtual GBool makeGlyph(int c, int xFrac, int yFrac,
59 SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes);
61 // Return the path for a glyph.
62 virtual SplashPath *getGlyphPath(int c);
64 // Return the advance of a glyph. (in 0..1 range)
65 virtual double getGlyphAdvance(int c);
67 private:
69 FT_Size sizeObj;
70 FT_Matrix matrix;
71 FT_Matrix textMatrix;
72 SplashCoord textScale;
73 int size;
74 GBool enableFreeTypeHinting;
75 GBool enableSlightHinting;
78 #endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
80 #endif