2005-08-26 18:18:29 +00:00
|
|
|
// -*- C++ -*-
|
2003-03-14 17:09:06 +00:00
|
|
|
// TeXFont.cpp
|
|
|
|
//
|
|
|
|
// Part of KDVI - A DVI previewer for the KDE desktop environemt
|
|
|
|
//
|
|
|
|
// (C) 2003 Stefan Kebekus
|
|
|
|
// Distributed under the GPL
|
2003-03-07 11:54:35 +00:00
|
|
|
|
|
|
|
#ifndef _TEXFONT_H
|
|
|
|
#define _TEXFONT_H
|
|
|
|
|
2003-03-14 17:09:06 +00:00
|
|
|
// Add header files alphabetically
|
|
|
|
|
|
|
|
#include "TeXFontDefinition.h"
|
2003-03-07 11:54:35 +00:00
|
|
|
|
|
|
|
class glyph;
|
|
|
|
|
|
|
|
|
|
|
|
class TeXFont {
|
|
|
|
public:
|
2003-03-14 17:09:06 +00:00
|
|
|
TeXFont(TeXFontDefinition *_parent)
|
|
|
|
{
|
2003-03-27 08:20:15 +00:00
|
|
|
parent = _parent;
|
|
|
|
errorMessage = QString::null;
|
2003-03-14 17:09:06 +00:00
|
|
|
};
|
|
|
|
|
2003-03-07 11:54:35 +00:00
|
|
|
virtual ~TeXFont();
|
2003-03-14 17:09:06 +00:00
|
|
|
|
2005-08-26 18:18:29 +00:00
|
|
|
void setDisplayResolution()
|
2003-03-07 11:54:35 +00:00
|
|
|
{
|
2003-03-14 17:09:06 +00:00
|
|
|
for(unsigned int i=0; i<TeXFontDefinition::max_num_of_chars_in_font; i++)
|
2003-03-07 11:54:35 +00:00
|
|
|
glyphtable[i].shrunkenCharacter.resize(0, 0);
|
|
|
|
};
|
2003-03-14 17:09:06 +00:00
|
|
|
|
2003-04-01 11:09:15 +00:00
|
|
|
virtual glyph *getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, QColor color=Qt::black) =0;
|
2003-03-14 17:09:06 +00:00
|
|
|
|
2003-03-07 11:54:35 +00:00
|
|
|
|
|
|
|
// 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.
|
2003-03-14 17:09:06 +00:00
|
|
|
Q_UINT32 checksum;
|
2003-03-27 08:20:15 +00:00
|
|
|
|
|
|
|
// If the font or if some glyphs could not be loaded, error messages
|
|
|
|
// will be put here.
|
|
|
|
QString errorMessage;
|
|
|
|
|
2003-03-14 17:09:06 +00:00
|
|
|
protected:
|
|
|
|
glyph glyphtable[TeXFontDefinition::max_num_of_chars_in_font];
|
|
|
|
TeXFontDefinition *parent;
|
2003-03-07 11:54:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|