1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
//========================================================================
//
// SplashFTFontEngine.h
//
// Copyright 2003-2013 Glyph & Cog, LLC
//
//========================================================================
#ifndef SPLASHFTFONTENGINE_H
#define SPLASHFTFONTENGINE_H
#include <aconf.h>
#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
#ifdef USE_GCC_PRAGMAS
#pragma interface
#endif
#include <ft2build.h>
#include FT_FREETYPE_H
#include "gtypes.h"
class GString;
class SplashFontFile;
class SplashFontFileID;
//------------------------------------------------------------------------
// SplashFTFontEngine
//------------------------------------------------------------------------
class SplashFTFontEngine {
public:
static SplashFTFontEngine *init(GBool aaA, Guint flagsA);
~SplashFTFontEngine();
// Load fonts.
SplashFontFile *loadType1Font(SplashFontFileID *idA,
#if LOAD_FONTS_FROM_MEM
GString *fontBuf,
#else
char *fileName, GBool deleteFile,
#endif
const char **enc);
SplashFontFile *loadType1CFont(SplashFontFileID *idA,
#if LOAD_FONTS_FROM_MEM
GString *fontBuf,
#else
char *fileName, GBool deleteFile,
#endif
const char **enc);
SplashFontFile *loadOpenTypeT1CFont(SplashFontFileID *idA,
#if LOAD_FONTS_FROM_MEM
GString *fontBuf,
#else
char *fileName, GBool deleteFile,
#endif
const char **enc);
SplashFontFile *loadCIDFont(SplashFontFileID *idA,
#if LOAD_FONTS_FROM_MEM
GString *fontBuf
#else
char *fileName, GBool deleteFile
#endif
);
SplashFontFile *loadOpenTypeCFFFont(SplashFontFileID *idA,
#if LOAD_FONTS_FROM_MEM
GString *fontBuf,
#else
char *fileName, GBool deleteFile,
#endif
int *codeToGID, int codeToGIDLen);
SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA,
#if LOAD_FONTS_FROM_MEM
GString *fontBuf,
#else
char *fileName, GBool deleteFile,
#endif
int fontNum,
int *codeToGID, int codeToGIDLen);
private:
SplashFTFontEngine(GBool aaA, Guint flagsA, FT_Library libA);
GBool aa;
Guint flags;
FT_Library lib;
GBool useCIDs;
friend class SplashFTFontFile;
friend class SplashFTFont;
};
#endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
#endif
|