Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-05 Thread Andre Poenitz
On Sun, Dec 03, 2006 at 11:25:05PM +0100, Abdelrazak Younes wrote: > According to Lars (IIRC), Qt4 did not support full utf16 (i.e. no > surrogate). That's why I didn't bother with the conversion. Looks like > Qt4.2 has changed that and the full utf16 is supported as the new > from/toUcs4() seem

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-05 Thread Andre Poenitz
On Sun, Dec 03, 2006 at 11:29:20PM +0100, Abdelrazak Younes wrote: > >PS: contrary to what you may think, I am very glad that you fixed this > >one. > > Good :-). I was a bit worried that everybody focused on the detail > without noticing the achievement... I spent an awful lot of time on this :-

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-04 Thread Georg Baum
Abdelrazak Younes wrote: > Surprised if there is difference, you can then commit safely. I found out that I had a thinko in the metrics stuff, so only committed the safe part. > Ah... very good, I over-read this part of the patch. > There's still one thing to support: some characters (mostly ara

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-04 Thread Abdelrazak Younes
Abdelrazak Younes wrote: That said, I would really prefer to let Dimension just be a simple 3-int structure without any method and let theFontMetrics() construct that and deliver it on demand. The last example will then become: Dimension dim = theFontMetrics(font).dimension(c); I guess

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-04 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Abdelrazak Younes wrote: Jean-Marc Lasgouttes wrote: Abdelrazak> And by the way, I think the cache should be enabled for Abdelrazak> Linux as well if you want to see scrolling performance Abdelrazak> improvement (especially for the bug 2900 test document). OK So, is

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-04 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Abdelrazak Younes wrote: Jean-Marc Lasgouttes wrote: Abdelrazak> And by the way, I think the cache should be enabled for Abdelrazak> Linux as well if you want to see scrolling performance Abdelrazak> improvement (especially for the bug 2900 test document). OK So, is

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-04 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Jean-Marc Lasgouttes wrote: Abdelrazak> And by the way, I think the cache should be enabled for Abdelrazak> Linux as well if you want to see scrolling performance Abdelrazak> improvement (especially for the bug 2900 test document). OK So, is there anybody against tha

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-03 Thread Martin Vermeer
On Sun, Dec 03, 2006 at 10:08:36PM +0100, Georg Baum wrote: > Am Samstag, 2. Dezember 2006 22:43 schrieb Abdelrazak Younes: > > Georg Baum wrote: ... > And there are a few other programs I want to run besides LyX and the OS. If > every program took 10 Mb of memory as if it was nothing then we a

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-03 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: Abdelrazak> And by the way, I think the cache should be enabled for Abdelrazak> Linux as well if you want to see scrolling performance Abdelrazak> improvement (especially for the bug 2900 test document). OK So, is there anybody against that? JMarc PS: contrary

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-03 Thread Abdelrazak Younes
Georg Baum wrote: Am Samstag, 2. Dezember 2006 22:43 schrieb Abdelrazak Younes: Georg Baum wrote: It is simple: Just do a proper conversion to QString. If André is right then everything else will be done by Qt. This is simple now (and this is good news) because QString support ucs4 in versio

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-03 Thread Georg Baum
Am Samstag, 2. Dezember 2006 22:43 schrieb Abdelrazak Younes: > Georg Baum wrote: > > It is simple: Just do a proper conversion to QString. If André is right > > then everything else will be done by Qt. > > This is simple now (and this is good news) because QString support ucs4 > in version 4.2

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-03 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Jean-Marc Lasgouttes wrote: >>> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> I agree with Jean-Marc that it is too much. LyX should also be usable on machines with less than 512 MB RAM

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-03 Thread Enrico Forestieri
On Sun, Dec 03, 2006 at 06:42:35PM +0200, Martin Vermeer wrote: > On Sun, Dec 03, 2006 at 04:48:26PM +0100, Abdelrazak Younes wrote: > > And by the way, I think the cache should be enabled for Linux as well if > > you want to see scrolling performance improvement (especially for the > > bug 290

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-03 Thread Martin Vermeer
On Sun, Dec 03, 2006 at 04:48:26PM +0100, Abdelrazak Younes wrote: > Jean-Marc Lasgouttes wrote: > >>"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: ... > Unless speed is not a good reason, I don't follow you. Let's just try to > be a tiny little bit pragmatic here. The problem

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-03 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: I agree with Jean-Marc that it is too much. LyX should also be usable on machines with less than 512 MB RAM. Abdelrazak> Hum, there's a few hundreds MB between 37 and 512 ;-) Let's look at things diff

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-03 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> I agree with Jean-Marc that it is too much. LyX should also be >> usable on machines with less than 512 MB RAM. Abdelrazak> Hum, there's a few hundreds MB between 37 and 512 ;-) Let's look at things differently. LyX used to

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-03 Thread Martin Vermeer
On Sat, 2006-12-02 at 22:43 +0100, Abdelrazak Younes wrote: > Georg Baum wrote: > > Am Samstag, 2. Dezember 2006 15:03 schrieb Abdelrazak Younes: ... > > > >> Besides... > >> 1) this has been reduced to 10Mo now and this is number is only for a > >> document using lots of fonts (UserGuide.lyx),

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-02 Thread Abdelrazak Younes
Georg Baum wrote: Am Samstag, 2. Dezember 2006 15:03 schrieb Abdelrazak Younes: 1) we don't know yet how to deal with more than 16 bits char with Qt4 (yet). From my initial reading of Qt docs, this is not clear how this could be supported and I don't have the time to investigate more. It is

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-02 Thread Georg Baum
Am Samstag, 2. Dezember 2006 15:03 schrieb Abdelrazak Younes: > Please, let's just concentrate on the 16bits range for now and make sure > that LyX is fine with that. And to answer Georg post in another thread, > I've replaced the unicode conversion with simple cast because: Oh, I knew the reaso

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-02 Thread Abdelrazak Younes
Andre Poenitz wrote: On Fri, Dec 01, 2006 at 04:12:25PM -, [EMAIL PROTECTED] wrote: +int GuiFontMetrics::ascent(char_type c) const +{ + unsigned short val = static_cast(c); + if (metrics_cache_[val].ascent == -1000) + fillCache(val); + + return metrics_cache_[

Re: [Cvslog] r16124 - in /lyx-devel/trunk/src: dimension.C dimension.h...

2006-12-02 Thread Andre Poenitz
On Fri, Dec 01, 2006 at 04:12:25PM -, [EMAIL PROTECTED] wrote: > +int GuiFontMetrics::ascent(char_type c) const > +{ > + unsigned short val = static_cast(c); > + if (metrics_cache_[val].ascent == -1000) > + fillCache(val); > + > + return metrics_cache_[val].ascent; > +}