]> www.fi.muni.cz Git - evince.git/blob - dvi/dvilib/dl-vffont.hh
*** empty log message ***
[evince.git] / dvi / dvilib / dl-vffont.hh
1 #ifndef DL_VFFONT_HH__
2 #define DL_VFFONT_HH__
3
4 #include "dl-dvi-file.hh"
5 #include "dl-dvi-fontdefinition.hh"
6 #include "dl-font.hh"
7
8 namespace DviLib {
9     
10     class VfChar : public AbstractCharacter {
11     public:
12         int tfm_width;
13         DviProgram *program;
14         int character_code;
15
16         virtual void paint (DviRuntime& runtime)
17         {
18             runtime.push();
19             program->execute (runtime); // FIXME push, pop, etc.
20             runtime.pop();
21         }
22         virtual int get_tfm_width () { return tfm_width; }
23     };
24     
25     class VfFontPreamble : public RefCounted {
26     public:
27         string comment;
28         uint checksum;
29         uint design_size;
30         vector <DviFontdefinition *> fontdefinitions;
31     };
32     
33     class VfFont : public AbstractFont {
34         VfFontPreamble *preamble;
35         map <int, VfChar *> chars;
36         int at_size;
37     public:
38         VfFont (AbstractLoader& l, int at_size);
39         virtual VfChar *get_char (int ccode) 
40         { 
41             return chars[ccode]; 
42         };
43         int get_design_size () 
44         { 
45             return preamble->design_size; 
46         }
47         virtual int get_at_size ()
48         {
49             /* FIXME (what is the correct thing to do here?) */
50             return at_size;
51         }
52         virtual ~VfFont () {}
53     };
54 }
55 #endif /* DL_VFFONT_HH__ */