Bug 296845 - Font rendering broken in OS X
Summary: Font rendering broken in OS X
Status: RESOLVED FIXED
Alias: None
Product: kfile
Classification: Applications
Component: kurlnavigator (show other bugs)
Version: unspecified
Platform: Compiled Sources macOS
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 332202 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-26 23:16 UTC by Rich
Modified: 2016-06-09 17:14 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Dolphin screenshot (65.61 KB, image/png)
2012-03-26 23:16 UTC, Rich
Details
Kate screenshot (59.52 KB, image/png)
2012-03-26 23:17 UTC, Rich
Details
Patched header file (387 bytes, application/octet-stream)
2014-03-16 17:28 UTC, Marko Käning
Details
Patch for KUrlNavigatorButtonBase code (1.14 KB, application/octet-stream)
2014-03-16 17:28 UTC, Marko Käning
Details
Example for navigator in develop (32.49 KB, image/png)
2014-03-25 20:19 UTC, Marko Käning
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rich 2012-03-26 23:16:17 UTC
Created attachment 69920 [details]
Dolphin screenshot

Installed KDE base apps and Kate from MacPorts. Everything is working beautifully, almost as well as a native Linux installation - except one thing. The font rendering. As shown in the screenshot attached. (It's also broken in Kate).
Comment 1 Rich 2012-03-26 23:17:34 UTC
Created attachment 69921 [details]
Kate screenshot
Comment 2 Hugo Pereira Da Costa 2012-04-02 14:22:11 UTC
Do you have the same issue if you change 
- widget style ? (to non oxygen)
- widget fonts ?
My suspicion is that the issue has nothing to do with oxygen (though I might be wrong).
Comment 3 vernon adams 2012-04-15 16:25:54 UTC
To test the source of this issue, please test with other fonts as the UI font. UI font can be changed fro desktop preferences. Is is one or many fonts that render with this issue?
Comment 4 Christoph Feck 2013-04-23 23:33:59 UTC
The problem here is that OS X has two font sizes, QToolButton defaults to using the small font size when the OS X style is used (in concordance with the Apple HIG), but applications incorrectly use the standard font size for rendering.

Dolphin screen shot shows KUrlNavigator, reassigning.

Kate screen shot is bug 258279.
Comment 5 Christoph Feck 2014-03-16 11:05:55 UTC
*** Bug 332202 has been marked as a duplicate of this bug. ***
Comment 6 Marko Käning 2014-03-16 12:00:52 UTC
This issue lingers around since ages here. Is there noone who could make tests?

If so, what can I do to take care of it myself? Hints welcome. :)
Comment 7 Christoph Feck 2014-03-16 14:49:10 UTC
Marko, you could try making KUrlNavigatorButtonBase inherit from QAbstractButton instead of QPushButton. I think the layouting of the QtMacStyle's QPushButton is responsible for the shifted text, but this is just a blind guess (I have no Mac to test).

When hovering over the button, is the item's selection rendering also overlapping the arrow?
Comment 8 Marko Käning 2014-03-16 14:53:09 UTC
(In reply to comment #7)
> Marko, you could try making KUrlNavigatorButtonBase inherit from
> QAbstractButton instead of QPushButton. I think the layouting of the
> QtMacStyle's QPushButton is responsible for the shifted text, but this is
> just a blind guess (I have no Mac to test).

Hmm, that means I would have to patch KDE's sources, create a patch and upgrade KDE to the patched version, before I can rebuild Dolphin to test its effect, right?!


> When hovering over the button, is the item's selection rendering also
> overlapping the arrow?
Yes, same thing. The arrow's surroundings get rendered a little darker. That's all the difference there is.
Comment 9 Marko Käning 2014-03-16 17:28:13 UTC
Created attachment 85604 [details]
Patched header file
Comment 10 Marko Käning 2014-03-16 17:28:56 UTC
Created attachment 85605 [details]
Patch for KUrlNavigatorButtonBase code
Comment 11 Marko Käning 2014-03-16 17:29:58 UTC
kdelibs4 is building right now.

I am wondering whether I'd need to rebuild all dependent libraries and apps as well...
Comment 12 Marko Käning 2014-03-16 17:36:11 UTC
I have to realise that my changes were too drastic, since suddenly other code would not work with those patches anymore:

:info:build /opt/local/var/macports/build/_Users_okram_WC_MacPorts_ports_kde_kdelibs4/kdelibs4/work/kdelibs-4.12.2/kfile/kurlnavigatorplacesselector.cpp:60:5: error: use of undeclared identifier 'setMenu'; did you mean 'QPushButton::setMenu'?
:info:build     setMenu(m_placesMenu);
:info:build     ^~~~~~~
:info:build     QPushButton::setMenu
:info:build /opt/local/include/QtGui/qpushbutton.h:80:10: note: 'QPushButton::setMenu' declared here
:info:build     void setMenu(QMenu* menu);
:info:build          ^
:info:build /opt/local/var/macports/build/_Users_okram_WC_MacPorts_ports_kde_kdelibs4/kdelibs4/work/kdelibs-4.12.2/kfile/kurlnavigatorplacesselector.cpp:60:5: error: call to non-static member function without an object argument
:info:build     setMenu(m_placesMenu);
:info:build     ^~~~~~~
Comment 13 Marko Käning 2014-03-25 20:19:26 UTC
Created attachment 85746 [details]
Example for navigator in develop

This is an example (taken from kdevelop) where the navigator looks odd, because the string "Home" is written over the little triangle.

Interesting is, that the tree view below doesn't show any overlapping of triangles and corresponding icon following them...
Comment 14 Christoph Feck 2014-03-25 21:29:38 UTC
Yes, below is a different widget, not a KUrlNavigator.
Comment 15 Marko Käning 2014-03-25 21:31:37 UTC
(In reply to comment #14)
> Yes, below is a different widget, not a KUrlNavigator.

I know, but I had hoped that that might help figuring out what to do for KUrlNavigator, but I guess that's not comparable, since for the latter it is text and for the other an image. (Sorry for the noise then.)
Comment 16 Marko Käning 2014-10-09 05:50:25 UTC
All this is not an issue if I do NOT use the "Macintosh (aqua)" theme. The standard KDE themes are fine (apart from a redraw glitch in pulldown menus) but best works QtCurve.
Comment 18 RJVB 2016-06-09 17:14:50 UTC
Fixed in #bd3b3c8b8af249c1dc3c020c09b8bab479411503