diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 47d455dd55be855e4cc691c32f687f723d9247ee (patch) | |
tree | 52e236aaa2576bdb3840ebede26619692fed6d7d /kdvi/TeXFont.h | |
download | tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdvi/TeXFont.h')
-rw-r--r-- | kdvi/TeXFont.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/kdvi/TeXFont.h b/kdvi/TeXFont.h new file mode 100644 index 00000000..8ff70499 --- /dev/null +++ b/kdvi/TeXFont.h @@ -0,0 +1,48 @@ +// -*- C++ -*- +// TeXFont.h +// +// Part of KDVI - A DVI previewer for the KDE desktop environemt +// +// (C) 2003 Stefan Kebekus +// Distributed under the GPL + +#ifndef _TEXFONT_H +#define _TEXFONT_H + +#include "TeXFontDefinition.h" +#include "glyph.h" + + +class TeXFont { + public: + TeXFont(TeXFontDefinition *_parent) + { + parent = _parent; + errorMessage = QString::null; + }; + + virtual ~TeXFont(); + + void setDisplayResolution() + { + for(unsigned int i=0; i<TeXFontDefinition::max_num_of_chars_in_font; i++) + glyphtable[i].shrunkenCharacter.resize(0, 0); + }; + + virtual glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black) = 0; + + // Checksum of the font. Used e.g. by PK fonts. This field is filled + // in by the constructor, or set to 0.0, if the font format does not + // contain checksums. + Q_UINT32 checksum; + + // If the font or if some glyphs could not be loaded, error messages + // will be put here. + QString errorMessage; + + protected: + glyph glyphtable[TeXFontDefinition::max_num_of_chars_in_font]; + TeXFontDefinition *parent; +}; + +#endif |