file(s) added by xpdf 1.01.
[swftools.git] / pdf2swf / xpdf / BuiltinFont.h
1 //========================================================================
2 //
3 // BuiltinFont.h
4 //
5 // Copyright 2001-2002 Glyph & Cog, LLC
6 //
7 //========================================================================
8
9 #ifndef BUILTINFONT_H
10 #define BUILTINFONT_H
11
12 #ifdef __GNUC__
13 #pragma interface
14 #endif
15
16 #include "gtypes.h"
17
18 struct BuiltinFont;
19 class BuiltinFontWidths;
20
21 //------------------------------------------------------------------------
22
23 struct BuiltinFont {
24   char *name;
25   char **defaultBaseEnc;
26   short ascent;
27   short descent;
28   short bbox[4];
29   BuiltinFontWidths *widths;
30 };
31
32 //------------------------------------------------------------------------
33
34 struct BuiltinFontWidth {
35   char *name;
36   Gushort width;
37   BuiltinFontWidth *next;
38 };
39
40 class BuiltinFontWidths {
41 public:
42
43   BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA);
44   ~BuiltinFontWidths();
45   GBool getWidth(char *name, Gushort *width);
46
47 private:
48
49   int hash(char *name);
50
51   BuiltinFontWidth **tab;
52   int size;
53 };
54
55 #endif