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

List:       kwrite-devel
Subject:    QFontInfo patch to qt-copy (was: Static Word Wrap Marker /
From:       Matthew Woehlke <mw_triad () users ! sourceforge ! net>
Date:       2007-07-31 20:03:11
Message-ID: f8o4i0$tg1$1 () sea ! gmane ! org
[Download RAW message or body]

Mirko Stocker wrote:
> Matthew and I found a problem with the static word wrap marker: On my system 
> (newer freetype) the marker is never drawn, regardless of the used font, and 
> it's always painted on Matthew's system. We determined that the problem lies 
> with QFont's fixedPitch method, which returns always false, respectively true 
> with Matthew.

(QFontInfo should be used as discussed elsewhere in the rest of the 
thread on kwrite, although it is/"was" similarly broken...)

For what it's worth, I checked in patch 0187 to qt-copy to use the OS-X 
glyph metric ('i' vs. 'm') check for all platforms. This won't affect 
font selection (e.g. in the case of fixed- and variable-width variants 
of the same family), but should make QFontInfo more reliable than the 
current 'not at all' situation.

The obvious downside is that this check might fail e.g. on a non-latin1 
font where the latin1 characters are 'placeholders', or on some screwy 
fonts that are variable width but happen to have 'i' and 'm' the same 
width. (On the other hand, Trolltech obviously felt the check was good 
enough for OS-X).

On the plus side however, we now have a decent chance of getting the 
right answer even when the font system and/or the font itself are lying 
to us :-).

(And yes, I already reported this to TT... though I don't have a TTID 
yet :-(.)

-- 
Matthew
"Every cloud has a silver lining (except for the mushroom shaped ones, 
which have a lining of iridium and strontium 90)" -- Sean Dwyer

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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