okular/TeXFont.h
Stefan Kebekus 0d4ef35d19 started to implement colored font specials (not yet working)
svn path=/trunk/kdegraphics/kdvi/; revision=217530
2003-04-01 11:09:15 +00:00

51 lines
1.2 KiB
C++

// TeXFont.cpp
//
// 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
// Add header files alphabetically
#include "TeXFontDefinition.h"
class glyph;
class TeXFont {
public:
TeXFont(TeXFontDefinition *_parent)
{
parent = _parent;
errorMessage = QString::null;
};
virtual ~TeXFont();
void setDisplayResolution(void)
{
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, 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