summaryrefslogtreecommitdiffstats
path: root/kdvi/TeXFont_TFM.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit47d455dd55be855e4cc691c32f687f723d9247ee (patch)
tree52e236aaa2576bdb3840ebede26619692fed6d7d /kdvi/TeXFont_TFM.h
downloadtdegraphics-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_TFM.h')
-rw-r--r--kdvi/TeXFont_TFM.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/kdvi/TeXFont_TFM.h b/kdvi/TeXFont_TFM.h
new file mode 100644
index 00000000..e68ba872
--- /dev/null
+++ b/kdvi/TeXFont_TFM.h
@@ -0,0 +1,38 @@
+// -*- C++ -*-
+// 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:
+ 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));}
+
+ Q_INT32 value;
+};
+
+class TeXFont_TFM : public TeXFont {
+ public:
+ TeXFont_TFM(TeXFontDefinition *parent);
+ ~TeXFont_TFM();
+
+ glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black);
+
+ 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