On Thu, Dec 07, 2006 at 09:47:56AM +0100, Abdelrazak Younes wrote:
> Enrico Forestieri wrote:
...
> >Index: src/frontends/qt2/qfont_loader.h
> >===================================================================
> >--- src/frontends/qt2/qfont_loader.h (revision 16192)
> >+++ src/frontends/qt2/qfont_loader.h (working copy)
> >@@ -22,7 +22,11 @@
> > #define USE_LYX_FONTCACHE
> > #endif
> > 
> >-#if defined(USE_LYX_FONTCACHE)
> >+#if defined(Q_WS_MACX) || defined(Q_WS_WIN)
> >+#define USE_LYX_FONTMETRICSCACHE
> >+#endif
> >+
> >+#if defined(USE_LYX_FONTCACHE) || defined(USE_LYX_FONTMETRICSCACHE)
> 
> Why are you distinguishing the two? The width cache is also a font 
> metrics cache. You only need one macro.

I saw the comment that Qt does its own caching on the width values,
so I thought that the ascent/descent cache could be independently
activated.

> > #include <map>
> > #endif
> > 
> >@@ -47,6 +51,14 @@ public:
> >     /// Cache of char widths
> >     WidthCache widthcache;
> 
> Same here, WidthCache is the same as your MetricsCache below. Just 
> define one type used for all three caches.

Yes, but in one case we have unsigned chars. I'll cast the values.

-- 
Enrico

Reply via email to