2005-08-26 18:18:29 +00:00
|
|
|
// -*- C++ -*-
|
2003-03-14 17:09:06 +00:00
|
|
|
// TeXFont_TFM.h
|
|
|
|
//
|
|
|
|
// Part of KDVI - A DVI previewer for the KDE desktop environemt
|
|
|
|
//
|
|
|
|
// (C) 2003 Stefan Kebekus
|
|
|
|
// Distributed under the GPL
|
|
|
|
|
|
|
|
#ifndef _TEXFONT_TFM_H
|
|
|
|
#define _TEXFONT_TFM_H
|
|
|
|
|
|
|
|
#include "TeXFont.h"
|
|
|
|
|
|
|
|
|
|
|
|
class fix_word {
|
|
|
|
public:
|
2005-08-26 18:18:29 +00:00
|
|
|
void fromINT32(Q_INT32 val) {value = val;}
|
|
|
|
void fromDouble(double val) {value = (Q_INT32)(val * (1<<20) + 0.5);}
|
|
|
|
double toDouble() {return (double(value)) / (double(1<<20));}
|
2003-03-14 17:09:06 +00:00
|
|
|
|
|
|
|
Q_INT32 value;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TeXFont_TFM : public TeXFont {
|
|
|
|
public:
|
|
|
|
TeXFont_TFM(TeXFontDefinition *parent);
|
|
|
|
~TeXFont_TFM();
|
|
|
|
|
2005-10-03 20:01:17 +00:00
|
|
|
glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black);
|
2003-03-14 17:09:06 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
fix_word characterWidth_in_units_of_design_size[256];
|
|
|
|
fix_word characterHeight_in_units_of_design_size[256];
|
|
|
|
|
|
|
|
fix_word design_size_in_TeX_points;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|