On Mon, Oct 14, 2002 at 07:23:02PM +0200, Andre Poenitz wrote:
>
> The AMS fonts are not used anymore in the Qt frontend (they are in xforms)
Are you using QT 2.x ?
It appears that QFont::exactMatch() doesn't work as expected in QT2.
Try the following patch.
Index: qfont_loader.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/qfont_loader.C,v
retrieving revision 1.9
diff -u -p -r1.9 qfont_loader.C
--- qfont_loader.C 14 Oct 2002 14:49:00 -0000 1.9
+++ qfont_loader.C 14 Oct 2002 18:41:34 -0000
@@ -20,6 +20,11 @@
#include "debug.h"
#include "lyxrc.h"
#include "BufferView.h"
+
+#include <qglobal.h>
+#if QT_VERSION < 0x030000
+#include "support/lstrings.h"
+#endif
using std::endl;
@@ -148,6 +153,24 @@ bool qfont_loader::available(LyXFont con
{
if (!lyxrc.use_gui)
return false;
-
+#if QT_VERSION >= 0x030000
return getfontinfo(f)->font.exactMatch();
+#else
+ string tmp;
+ switch (f.family()) {
+ case LyXFont::SYMBOL_FAMILY: tmp = "symbol"; break;
+ case LyXFont::CMR_FAMILY: tmp = "cmr10"; break;
+ case LyXFont::CMSY_FAMILY: tmp = "cmsy10"; break;
+ case LyXFont::CMM_FAMILY: tmp = "cmmi10"; break;
+ case LyXFont::CMEX_FAMILY: tmp = "cmex10"; break;
+ case LyXFont::MSA_FAMILY: tmp = "msam10"; break;
+ case LyXFont::MSB_FAMILY: tmp = "msbm10"; break;
+ default: break;
+ }
+ if (tmp.empty())
+ return false;
+ else
+ return token(getfontinfo(f)->font.rawName().latin1(), '-', 2)
+ == tmp;
+#endif
}