diff options
author | Søren Sandmann <sandmann@redhat.com> | 2004-12-21 23:57:26 (GMT) |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2004-12-21 23:57:26 (GMT) |
commit | 4296951e94a43c723e9522b588cab178eb66d144 (patch) | |
tree | 63ba229741d10df67fe87f24b6241903e16e9764 /dvi/dvilib/dl-vffont.hh | |
parent | 3e73e947a3a8c03da8f35f52e2a42ba066e2be2a (diff) |
New directory with the beginning of a .dvi backend.
Tue Dec 21 18:55:06 2004 Søren Sandmann <sandmann@redhat.com>
* dvi/*: New directory with the beginning of a .dvi backend.
Diffstat (limited to 'dvi/dvilib/dl-vffont.hh')
-rwxr-xr-x | dvi/dvilib/dl-vffont.hh | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/dvi/dvilib/dl-vffont.hh b/dvi/dvilib/dl-vffont.hh new file mode 100755 index 0000000..185e4a9 --- /dev/null +++ b/dvi/dvilib/dl-vffont.hh @@ -0,0 +1,55 @@ +#ifndef DL_VFFONT_HH__ +#define DL_VFFONT_HH__ + +#include "dl-dvi-file.hh" +#include "dl-dvi-fontdefinition.hh" +#include "dl-font.hh" + +namespace DviLib { + + class VfChar : public AbstractCharacter { + public: + int tfm_width; + DviProgram *program; + int character_code; + + virtual void paint (DviRuntime& runtime) + { + runtime.push(); + program->execute (runtime); // FIXME push, pop, etc. + runtime.pop(); + } + virtual int get_tfm_width () { return tfm_width; } + }; + + class VfFontPreamble : public RefCounted { + public: + string comment; + uint checksum; + uint design_size; + vector <DviFontdefinition *> fontdefinitions; + }; + + class VfFont : public AbstractFont { + VfFontPreamble *preamble; + map <int, VfChar *> chars; + int at_size; + public: + VfFont (AbstractLoader& l, int at_size); + virtual VfChar *get_char (int ccode) + { + return chars[ccode]; + }; + int get_design_size () + { + return preamble->design_size; + } + virtual int get_at_size () + { + /* FIXME (what is the correct thing to do here?) */ + return at_size; + } + virtual ~VfFont () {} + }; +} +#endif /* DL_VFFONT_HH__ */ |