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

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

First import

File size: 1.3 KB
RevLine 
[2]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  double m11, m12, m21, m22;
35};
36
37//------------------------------------------------------------------------
38
39#define cairoFontCacheSize 64
40
41//------------------------------------------------------------------------
42// CairoFontEngine
43//------------------------------------------------------------------------
44
45class CairoFontEngine {
46public:
47
48  // Create a font engine.
49  CairoFontEngine(FT_Library libA);
50  ~CairoFontEngine();
51
52  CairoFont *getFont(GfxFont *gfxFont, XRef *xref);
53
54private:
55  CairoFont *fontCache[cairoFontCacheSize];
56  FT_Library lib;
57  GBool useCIDs;
58};
59
60#endif
Note: See TracBrowser for help on using the repository browser.