[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Large font line spacing in Qt3 (1st explaination)
From:       Michael Goffioul <goffioul () imec ! be>
Date:       2001-10-01 14:52:07
[Download RAW message or body]

Hi,

for those interested, this is a first explaination about the larger line
spacing I noticed when using Qt3 (in comparison with Qt2). The reference
mail is at http://lists.kde.org/?l=kde-devel&m=99970129828679&w=2

After a few hours digging into Qt code, I finally found out that the
difference between Qt2 and Qt3 for font loading, is that Qt3 tries first
to load a unicode font, using the encoding iso10646, before trying to
load a font with the default script. On my system, using XFree86-4.1.0,
it turns out that my helvetica font doesn't have the same ascent and
descent for all encodings, especially the sum ascent+descent (~= line
spacing) is 33% larger for the unicode font than for the latin1 font.
This is why line spacing is much larger when using Qt3, and it's not
really Qt's fault. :-)
As a (ugly) workaround, I hacked Qt's code to disable the unicode first
try when loading fonts. I could then get back the same behavior as with
Qt2. This is of course not a long term solution, but that's the only
thing I thought about.

Any comment or better solution is welcome.

Bye.
Michael.

-- 
------------------------------------------------------------------
Michael Goffioul		IMEC-DESICS-MIRA
e-mail: goffioul@imec.be	(Mixed-Signal and RF Applications)
Tel:    +32/16/28-8510		Kapeldreef, 75
Fax:    +32/16/28-1515		3001 HEVERLEE, BELGIUM
------------------------------------------------------------------
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic