00001 //======================================================================== 00002 // 00003 // BuiltinFont.h 00004 // 00005 // Copyright 2001-2002 Glyph & Cog, LLC 00006 // 00007 //======================================================================== 00008 00009 #ifndef BUILTINFONT_H 00010 #define BUILTINFONT_H 00011 00012 #ifdef __GNUC__ 00013 #pragma interface 00014 #endif 00015 00016 #include "gtypes.h" 00017 00018 struct BuiltinFont; 00019 class BuiltinFontWidths; 00020 00021 //------------------------------------------------------------------------ 00022 00023 struct BuiltinFont { 00024 char *name; 00025 char **defaultBaseEnc; 00026 short ascent; 00027 short descent; 00028 short bbox[4]; 00029 BuiltinFontWidths *widths; 00030 }; 00031 00032 //------------------------------------------------------------------------ 00033 00034 struct BuiltinFontWidth { 00035 char *name; 00036 Gushort width; 00037 BuiltinFontWidth *next; 00038 }; 00039 00040 class BuiltinFontWidths { 00041 public: 00042 00043 BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA); 00044 ~BuiltinFontWidths(); 00045 GBool getWidth(char *name, Gushort *width); 00046 00047 private: 00048 00049 int hash(char *name); 00050 00051 BuiltinFontWidth **tab; 00052 int size; 00053 }; 00054 00055 #endif
1.4.2