From kwrite-devel Tue Jul 31 20:03:11 2007 From: Matthew Woehlke Date: Tue, 31 Jul 2007 20:03:11 +0000 To: kwrite-devel Subject: QFontInfo patch to qt-copy (was: Static Word Wrap Marker / Message-Id: X-MARC-Message: https://marc.info/?l=kwrite-devel&m=118591226231757 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