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

List:       kwrite-devel
Subject:    Static Word Wrap Marker / QFont::fixedPitch() Problem
From:       Mirko Stocker <me () misto ! ch>
Date:       2007-07-29 18:56:56
Message-ID: 200707292057.02324.me () misto ! ch
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


Hi!

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. Now, the interesting thing is, QFontInfo::fixedPitch() works as 
expected, so we could just use that to decied whether to draw the marker or 
not, but I'm not sure if this really solves the problem or just bypasses it.. 
any opinions?

Thanks

Mirko

PS: I've attached the patch to change it, in case somebody wants to try it 
out.

["fixed_pitch.patch" (text/x-diff)]

Index: render/katerenderer.cpp
===================================================================
--- render/katerenderer.cpp	(revision 693609)
+++ render/katerenderer.cpp	(working copy)
@@ -673,7 +673,7 @@
   */
 
   // show word wrap marker if desirable
-  if ((!isPrinterFriendly()) && config()->wordWrapMarker() && config()->font().fixedPitch())
+  if ((!isPrinterFriendly()) && config()->wordWrapMarker() && QFontInfo(config()->font()).fixedPitch())
   {
     paint.setPen( config()->wordWrapMarkerColor() );
     int _x = m_doc->config()->wordWrapAt() * fm.width('x') - xStart;

["signature.asc" (application/pgp-signature)]

_______________________________________________
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