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

Last change on this file since 27 was 27, checked in by Eugene Romanenko, 15 years ago

poppler updated to version 0.5.2, also needed changes to be compatible with new poppler

File size: 1.2 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  CairoFont(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  Ref ref;
29  cairo_font_face_t *cairo_font_face;
30  FT_Face face;
31
32  Gushort *codeToGID;
33  int codeToGIDLen;
34};
35
36//------------------------------------------------------------------------
37
38#define cairoFontCacheSize 64
39
40//------------------------------------------------------------------------
41// CairoFontEngine
42//------------------------------------------------------------------------
43
44class CairoFontEngine {
45public:
46
47  // Create a font engine.
48  CairoFontEngine(FT_Library libA);
49  ~CairoFontEngine();
50
51  CairoFont *getFont(GfxFont *gfxFont, XRef *xref);
52
53private:
54  CairoFont *fontCache[cairoFontCacheSize];
55  FT_Library lib;
56  GBool useCIDs;
57};
58
59#endif
Note: See TracBrowser for help on using the repository browser.