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