source: trunk/poppler/mypoppler/poppler/CairoFontEngine.h @ 50

Last change on this file since 50 was 44, checked in by Eugene Romanenko, 16 years ago

poppler updated to version 0.5.3, related changes

File size: 1.4 KB
Line 
1//========================================================================
2//
3// CairoFontEngine.h
4//
5//========================================================================
6
7#ifndef CAIROFONTENGINE_H
8#define CAIROFONTENGINE_H
9
10#ifdef USE_GCC_PRAGMAS
11#pragma interface
12#endif
13
14#include "goo/gtypes.h"
15#include <cairo-ft.h>
16
17#include "GfxFont.h"
18
19class CairoFont {
20public:
21  static CairoFont *create(GfxFont *gfxFont, XRef *xref, FT_Library lib, GBool useCIDs);
22  ~CairoFont();
23
24  GBool matches(Ref &other);
25  cairo_font_face_t *getFontFace(void);
26  unsigned long getGlyph(CharCode code, Unicode *u, int uLen);
27private:
28  CairoFont(Ref ref, cairo_font_face_t *cairo_font_face, FT_Face face,
29      Gushort *codeToGID, int codeToGIDLen);
30  Ref ref;
31  cairo_font_face_t *cairo_font_face;
32  FT_Face face;
33
34  Gushort *codeToGID;
35  int codeToGIDLen;
36};
37
38//------------------------------------------------------------------------
39
40#define cairoFontCacheSize 64
41
42//------------------------------------------------------------------------
43// CairoFontEngine
44//------------------------------------------------------------------------
45
46class CairoFontEngine {
47public:
48
49  // Create a font engine.
50  CairoFontEngine(FT_Library libA);
51  ~CairoFontEngine();
52
53  CairoFont *getFont(GfxFont *gfxFont, XRef *xref);
54
55private:
56  CairoFont *fontCache[cairoFontCacheSize];
57  FT_Library lib;
58  GBool useCIDs;
59};
60
61#endif
Note: See TracBrowser for help on using the repository browser.