]>
git.ipfire.org Git - thirdparty/cups.git/blob - pdftops/T1Font.h
1 //========================================================================
5 // An X wrapper for the t1lib Type 1 font rasterizer.
7 //========================================================================
24 //------------------------------------------------------------------------
26 class T1FontEngine
: public SFontEngine
{
29 T1FontEngine(Display
*displayA
, Visual
*visualA
, int depthA
,
30 Colormap colormapA
, GBool aaA
, GBool aaHighA
);
31 GBool
isOk() { return ok
; }
32 virtual ~T1FontEngine();
36 GBool aa
; // use anti-aliasing?
37 GBool aaHigh
; // use high-res anti-aliasing?
40 friend class T1FontFile
;
44 //------------------------------------------------------------------------
46 class T1FontFile
: public SFontFile
{
49 T1FontFile(T1FontEngine
*engineA
, char *fontFileName
,
50 FontEncoding
*fontEnc
, double *bboxA
);
51 GBool
isOk() { return ok
; }
52 virtual ~T1FontFile();
57 int id
; // t1lib font ID
66 //------------------------------------------------------------------------
68 struct T1FontCacheTag
{
70 Gushort mru
; // valid bit (0x8000) and MRU index
71 int x
, y
, w
, h
; // offset and size of glyph
74 class T1Font
: public SFont
{
77 T1Font(T1FontFile
*fontFileA
, double *m
);
78 GBool
isOk() { return ok
; }
80 virtual GBool
drawChar(Drawable d
, int w
, int h
, GC gc
,
81 int x
, int y
, int r
, int g
, int b
, Gushort c
);
85 Guchar
*getGlyphPixmap(Gushort c
, int *x
, int *y
, int *w
, int *h
);
91 int glyphW
, glyphH
; // size of glyph pixmaps
92 int glyphSize
; // size of glyph pixmaps, in bytes
93 Guchar
*cache
; // glyph pixmap cache
94 T1FontCacheTag
*cacheTags
; // cache tags, i.e., char codes
95 int cacheSets
; // number of sets in cache
96 int cacheAssoc
; // cache associativity (glyphs per set)
100 #endif // HAVE_T1LIB_H