>>>>> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

>>>>> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Abdelrazak> Bennett Helm wrote:
>>> here? ... I'm guessing not: I have Jean-Marc's font caching patch
>>> applied to 1.4.x (which noticeably improves things), but not to
>>> 1.5.x; perhaps that accounts for the difference.

Abdelrazak> Jean-Marc, IMHO you should check-in this patch for qt3
Abdelrazak> (trunk and 1.4).

Jean-Marc> I plan to do so, but I have been busy recently. My plan for
Jean-Marc> now is to do that for OSX only. If other users (windows?)
Jean-Marc> have evidence of a gain with qt3, speak up.

Here are the patches. Bennett, do they work?

JMarc

Index: src/frontends/qt2/qfont_loader.C
===================================================================
--- src/frontends/qt2/qfont_loader.C	(revision 14125)
+++ src/frontends/qt2/qfont_loader.C	(working copy)
@@ -359,7 +359,7 @@ QLFontInfo::QLFontInfo(LyXFont const & f
 }
 
 
-int QLFontInfo::width(Uchar val) const
+int QLFontInfo::width(Uchar val)
 {
 // Starting with version 3.1.0, Qt/X11 does its own caching of
 // character width, so it is not necessary to provide ours.
Index: src/frontends/qt2/qfont_loader.h
===================================================================
--- src/frontends/qt2/qfont_loader.h	(revision 14125)
+++ src/frontends/qt2/qfont_loader.h	(working copy)
@@ -18,7 +18,7 @@
 #include <qfont.h>
 #include <qfontmetrics.h>
 
-#if QT_VERSION < 0x030100
+#if QT_VERSION < 0x030100 || defined(Q_WS_MACX)
 #define USE_LYX_FONTCACHE
 #endif
 
@@ -35,7 +35,7 @@ public:
 	QLFontInfo(LyXFont const & f);
 
 	/// Return pixel width for the given unicode char
-	int width(Uchar val) const;
+	int width(Uchar val);
 
 	/// The font instance
 	QFont font;
Index: src/frontends/qt3/qfont_loader.C
===================================================================
--- src/frontends/qt3/qfont_loader.C	(revision 14125)
+++ src/frontends/qt3/qfont_loader.C	(working copy)
@@ -359,7 +359,7 @@ QLFontInfo::QLFontInfo(LyXFont const & f
 }
 
 
-int QLFontInfo::width(Uchar val) const
+int QLFontInfo::width(Uchar val)
 {
 // Starting with version 3.1.0, Qt/X11 does its own caching of
 // character width, so it is not necessary to provide ours.
Index: src/frontends/qt3/qfont_loader.h
===================================================================
--- src/frontends/qt3/qfont_loader.h	(revision 14125)
+++ src/frontends/qt3/qfont_loader.h	(working copy)
@@ -18,7 +18,7 @@
 #include <qfont.h>
 #include <qfontmetrics.h>
 
-#if QT_VERSION < 0x030100
+#if QT_VERSION < 0x030100 || defined(Q_WS_MACX)
 #define USE_LYX_FONTCACHE
 #endif
 
@@ -35,7 +35,7 @@ public:
 	QLFontInfo(LyXFont const & f);
 
 	/// Return pixel width for the given unicode char
-	int width(Uchar val) const;
+	int width(Uchar val);
 
 	/// The font instance
 	QFont font;

Reply via email to