]>
git.ipfire.org Git - thirdparty/cups.git/blob - pdftops/SplashFontEngine.h
1 //========================================================================
5 //========================================================================
7 #ifndef SPLASHFONTENGINE_H
8 #define SPLASHFONTENGINE_H
12 #ifdef USE_GCC_PRAGMAS
18 class SplashT1FontEngine
;
19 class SplashFTFontEngine
;
20 class SplashDTFontEngine
;
21 class SplashDT4FontEngine
;
23 class SplashFontFileID
;
26 //------------------------------------------------------------------------
28 #define splashFontCacheSize 16
30 //------------------------------------------------------------------------
32 //------------------------------------------------------------------------
34 class SplashFontEngine
{
37 // Create a font engine.
42 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
49 // Get a font file from the cache. Returns NULL if there is no
50 // matching entry in the cache.
51 SplashFontFile
*getFontFile(SplashFontFileID
*id
);
53 // Load fonts - these create new SplashFontFile objects.
54 SplashFontFile
*loadType1Font(SplashFontFileID
*idA
, char *fileName
,
55 GBool deleteFile
, char **enc
);
56 SplashFontFile
*loadType1CFont(SplashFontFileID
*idA
, char *fileName
,
57 GBool deleteFile
, char **enc
);
58 SplashFontFile
*loadCIDFont(SplashFontFileID
*idA
, char *fileName
,
60 SplashFontFile
*loadTrueTypeFont(SplashFontFileID
*idA
, char *fileName
,
62 Gushort
*codeToGID
, int codeToGIDLen
);
64 // Get a font - this does a cache lookup first, and if not found,
65 // creates a new SplashFont object and adds it to the cache. The
69 // specifies the font transform in PostScript style:
70 // [x' y'] = [x y] * mat
71 // Note that the Splash y axis points downward.
72 SplashFont
*getFont(SplashFontFile
*fontFile
, SplashCoord
*mat
);
76 SplashFont
*fontCache
[splashFontCacheSize
];
79 SplashT1FontEngine
*t1Engine
;
81 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
82 SplashFTFontEngine
*ftEngine
;