http://bugzilla.lyx.org/show_bug.cgi?id=3684(A simple search does not show this bug since it is marked as UNCONFIRMED. Could someone please change that to NEW.)If I run with debugger and set the screen font to Times, I get: LyXFunc::dispatch: cmd: action: 201 arg: '' x: 0 y: 0 BufferView::updateFont 'Roman, Medium, Upright, Normal, none, Emphasis Off, Underline Off, Noun Off, Language: English' matched byTimes This font is NOT an exact match XFLD: Times The font has size: 15 Anyone knows if this might be a clue?
It is a Qt 4.3 bug. The Qt demo application show the same behavior. Here is a simple fix for the time being. We can add an upper version limit as soon as Trolltech announces a fix. I reported the bug to them.
Stefan Index: src/frontends/qt4/GuiFontLoader.cpp =================================================================== --- src/frontends/qt4/GuiFontLoader.cpp (Revision 18631) +++ src/frontends/qt4/GuiFontLoader.cpp (Arbeitskopie) @@ -221,10 +221,20 @@ boost::tie(font, tmp) = getSymbolFont(pat); } else { switch (f.family()) { - case Font::ROMAN_FAMILY: - font.setFamily(toqstr(makeFontName(lyxrc.roman_font_name, - lyxrc.roman_font_foundry))); + case Font::ROMAN_FAMILY: { + QString family = toqstr(makeFontName(lyxrc.roman_font_name, + lyxrc.roman_font_foundry)); + font.setFamily(family); +#ifdef Q_WS_MACX +#if QT_VERSION >= 0x040300+ // Workaround for a Qt bug, see http://bugzilla.lyx.org/ show_bug.cgi?id=3684
+ // It is reported to Trolltech at 02/06/07 against 4.3 final. + if (family == "Times" && !font.exactMatch()) + font.setFamily(QString::fromLatin1("Times New Roman")); +#endif +#endif break; + } case Font::SANS_FAMILY: font.setFamily(toqstr(makeFontName(lyxrc.sans_font_name, lyxrc.sans_font_foundry)));
timesmac.patch
Description: Binary data
PGP.sig
Description: Signierter Teil der Nachricht