+2002-10-16 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * qfont_loader.C (font_info): correct calculation of font size
+ (point size) for qt.
+
2002-10-15 Lars Gullik Bjønnes <larsbj@birdstep.com>
* QBrowseBox.C (QBrowseBox): transpose const char
* Licence details can be found in the file COPYING.
*
* \author Asger Alstrup
- * \author John Levon
+ * \author John Levon
*
* Full author contact details are available in file CREDITS
*/
#if QT_VERSION < 0x030000
#include "support/lstrings.h"
#endif
-
+
using std::endl;
-
+
qfont_loader::qfont_loader()
{
}
int i1,i2,i3,i4;
// fuck this !
-
+
for (i1 = 0; i1 < LyXFont::NUM_FAMILIES; ++i1) {
for (i2 = 0; i1 < 2; ++i2) {
for (i3 = 0; i1 < 4; ++i3) {
}
}
-
+
QFont const & qfont_loader::get(LyXFont const & f)
{
QFont const & ret(getfontinfo(f)->font);
-
+
if (lyxerr.debugging(Debug::FONT)) {
lyxerr[Debug::FONT] << "Font '" << f.stateText(0)
<< "' matched by\n" << ret.rawName().latin1() << endl;
return ret;
}
-
+
qfont_loader::font_info::font_info(LyXFont const & f)
: metrics(font)
{
font.setFamily("courier");
break;
}
-
- font.setPointSize(int((lyxrc.font_sizes[f.size()] * lyxrc.dpi *
- (lyxrc.zoom / 100.0)) / 72.27 + 0.5));
-
+
+ font.setPointSizeFloat(lyxrc.font_sizes[f.size()]
+ * lyxrc.zoom / 100.0);
+
// FIXME: lyxrc, check for failure etc.
-
+
switch (f.series()) {
case LyXFont::MEDIUM_SERIES:
font.setWeight(QFont::Normal);
font.setWeight(QFont::Bold);
break;
}
-
+
switch (f.realShape()) {
case LyXFont::ITALIC_SHAPE:
case LyXFont::SLANTED_SHAPE:
}
}
-
+
bool qfont_loader::available(LyXFont const & f)
{
if (!lyxrc.use_gui)