Bug 193369 - [plasma] task manager applet renders bitmap fonts in white (window title text)
Summary: [plasma] task manager applet renders bitmap fonts in white (window title text)
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-taskbar (show other bugs)
Version: 4.5 and older
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 217540 248365 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-05-20 17:43 UTC by JR
Modified: 2012-05-16 09:26 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Bitmap font, Air panel theme (22.12 KB, image/png)
2009-05-20 17:46 UTC, JR
Details
Bitmap font, Oxygen panel theme (17.36 KB, image/png)
2009-05-20 17:52 UTC, JR
Details
Bitmap font, Rhapsody panel theme (via Get Hot New Stuff) (22.80 KB, image/png)
2009-05-20 17:55 UTC, JR
Details
Vertex font, Aya panel theme in 4.4rc1 (6.41 KB, image/png)
2010-01-14 00:36 UTC, JR
Details
Vertex font, Aya panel theme in 4.4rc1 (new) (35.07 KB, image/png)
2010-01-14 00:45 UTC, JR
Details
Screenshot of krunner displaying Japanese and English characters (15.01 KB, image/png)
2010-06-10 02:10 UTC, Yaohan Chen
Details
Screenshot of task list showing Japanese and English text (23.65 KB, image/png)
2010-06-10 02:12 UTC, Yaohan Chen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JR 2009-05-20 17:43:32 UTC
Version:            (using KDE 4.2.85)
OS:                Linux
Installed from:    Ubuntu Packages

This may be related to bug 174832. (https://bugs.kde.org/show_bug.cgi?id=174832)


The task manager applet renders bitmap fonts in white, regardless of the color the theme says fonts should be. Meaning, if I have a window with Japanese characters in the title, and I have set my fonts up to use a bitmapped font to display them, those characters will be rendered white while any surrounding (Roman/Western) characters, or any such in other windows' titles, may be of a different color.

For us who read CJK characters, it is a desirable trait to have them drawn as bitmaps, as they otherwise (as vectors) quickly become blurry and illegible at lower sizes (<~17px).

This is particularly confusing with the new Air theme where the panel background is bright, giving it a white-upon-white look. Trying other themes - like Oxygen, Rhapsody, Glassified and Glowish - the behavior persists, so it seems to be a theme-independent issue. It just wasn't as obvious until Air came along, as those other themes have darker/black backgrounds and bright grey text. (Even with bright grey vector text, you can see the bitmaps are white.)

As a small mention, no other "effects" are applied to those bitmap characters, like glow effects, but this could well be by design.


How to reproduce:
 * Add a task manager applet to a panel, and apply a panel theme that has text color set to anything other than white (Air recommended)
 * Aquire a font with bitmaps (Kochi Gothic/Mincho, Sazanami Gothic/Mincho, ...) and enable display of bitmaps, such as in ~/.fonts.conf
 * Force a window to contain the bitmapped font in its title, thereby causing the task manager to render that title text, such as by opening any Wikipedia entry over at http://ja.wikipedia.org (main page doesn't contain any)
 * Observe color differences in the task manager entry text

Expected behavior: The task manager should obey theme text colors, regardless of whether it is a bitmap font or not.


This is with KDE 4.2.85 from the kubuntu-ppa/experimental repository listed over at kubuntu.org. kdebase-workspace-bin, which contains plasma_applet_tasks.so, is of package version 4:4.2.85-0ubuntu2~jaunty2~ppa6.


Attaching some screenshots.
Comment 1 JR 2009-05-20 17:46:26 UTC
Created attachment 33861 [details]
Bitmap font, Air panel theme
Comment 2 JR 2009-05-20 17:52:16 UTC
Created attachment 33862 [details]
Bitmap font, Oxygen panel theme
Comment 3 JR 2009-05-20 17:55:16 UTC
Created attachment 33863 [details]
Bitmap font, Rhapsody panel theme (via Get Hot New Stuff)

I could go on, but I hope the trend is made clear.
Comment 4 Beat Wolf 2009-12-08 18:37:13 UTC
*** Bug 217540 has been marked as a duplicate of this bug. ***
Comment 5 Kaorukun 2009-12-12 02:09:25 UTC
Version:           4.3.3
OS:                Linux
Installed from:    Gentoo Portage

I can confirm this behavior in my case. The bitmap fonts, in particular Japanese and Chinese characters are rendered white in the taskbar. This is the case when the user leaves the default font configuration for taskbar as "Sans Serif". Configuring any vector-based font like BitStream Cyberbit or Arial Unicode MS as taskbar font alleviates this problem.

I can't confirm it now, but I remember that this bug was present since the early releases of KDE 4.0. Back then, the default color scheme was dark, and with white foreground color, both Latin and Japanese characters appeared correctly white on the dark background in the taskbar. Once I attempted to configure this scheme to a brighter color, the incorrect color of the Japanese characters was revealed.
Comment 6 Beat Wolf 2009-12-12 11:57:31 UTC
*** Bug 217540 has been marked as a duplicate of this bug. ***
Comment 7 Kolia 2010-01-02 23:04:05 UTC
I can not reproduce this bug with KDE 4.4 SVN 1068732 | Qt 4.6.0. For me when browsing on a webpage containing CJK characters in its title, these characters display in the same font color than latin characters in the taskbar (that is, in black in Air theme). I tested using Sans Serif for the taskbar, but also Kochi Gothic.

However, I'm not 100% sure I was reproducing the good steps because JR (the initial reporter of this bug) talks about enabling "bitmap fonts", and i'm not sure I did it well. Can someone detail how to achieve this?
Comment 8 Stefan Kombrink 2010-01-03 09:40:58 UTC
dear kolia,

 have a look at this dupe where I describe how to enable bitmap fonts.
(Works for me on Ubuntu)
https://bugs.kde.org/show_bug.cgi?id=217540

Stefan

2010/1/2 Kolia <thelwyn@gmail.com>:
> https://bugs.kde.org/show_bug.cgi?id=193369
>
>
> Kolia <thelwyn@gmail.com> changed:
>
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                 CC|                            |thelwyn@gmail.com
>
>
>
>
> --- Comment #7 from Kolia <thelwyn gmail com>  2010-01-02 23:04:05 ---
> I can not reproduce this bug with KDE 4.4 SVN 1068732 | Qt 4.6.0. For me when
> browsing on a webpage containing CJK characters in its title, these characters
> display in the same font color than latin characters in the taskbar (that is,
> in black in Air theme). I tested using Sans Serif for the taskbar, but also
> Kochi Gothic.
>
> However, I'm not 100% sure I was reproducing the good steps because JR (the
> initial reporter of this bug) talks about enabling "bitmap fonts", and i'm not
> sure I did it well. Can someone detail how to achieve this?
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
Comment 9 Kolia 2010-01-04 00:26:14 UTC
Hi Stefan,

OK i check your description and it was what I did so it seems that I enabled bitmap fonts. Still I can't reproduce the problem, the japanese characters display correctly in the color of the theme font color :/
Comment 10 JR 2010-01-14 00:36:48 UTC
Created attachment 39868 [details]
Vertex font, Aya panel theme in 4.4rc1

Original reporter here.

I'm now using 4.4rc1, and the task manager applet doesn't seem to want to use bitmaps font anymore. Even with fontconfig set up properly so that other apps use it (including the application menu widget), window titles in the task manager have their fonts drawn as vertex fonts.

That's one way to solve the bug, I guess, but I would have liked bitmap fonts with some shadow behind them. At least fuzzy characters are easier to read than white-on-white characters, but not always by much. (See attachment.)
Comment 11 JR 2010-01-14 00:45:32 UTC
Created attachment 39869 [details]
Vertex font, Aya panel theme in 4.4rc1 (new)

New screenshot of the 4.4rc1 behavior, better illustrating the difference between vertex rendering and bitmaps of fonts.
Comment 12 Liu DongMiao 2010-02-11 21:07:26 UTC
Actually, it shouldn't be called a bug of code, but a bug of theme.

In #5, Kaorukun@gmx.net said that's the problem of theme, in fact, it is.

KDE fans can change another color for "Active Titlebar Text" in "System Settings" -> "Appearance" -> "Colors" -> "Colors", default is white. And you ma want to change color of "Selection Text" too.

Note: there is only two color for text:
        QColor shadowColor(Qt::black);
        if (defaultTextColor.value() < 128) {
            shadowColor = Qt::white;
        }
line 1231-1234 in svn 1085662, just above Plasma::PaintUtils::shadowText.
For API of shadowText, please refer to http://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/namespacePlasma_1_1PaintUtils.html#a935ab826ba21bbd42c826118956f47b8

But why when the color is white, but the non-bitmap font displays in black, I still don't know.
Comment 13 Liu DongMiao 2010-02-11 21:18:56 UTC
sorry, i post correct code... should be in tasks/abstracttaskitem.cpp, not pager/pager.cpp
Comment 14 Nicolas L. 2010-06-07 08:46:27 UTC
Can you reproduce using KDE 4.4.4 or 4.5beta?
Comment 15 Yaohan Chen 2010-06-10 02:10:20 UTC
Created attachment 47840 [details]
Screenshot of krunner displaying Japanese and English characters

Krunner in KDE 4.5beta2 (Kubuntu package) displays Japanese text in white while English text in black. This is done with the google-translator-runner plugin.
Comment 16 Yaohan Chen 2010-06-10 02:12:16 UTC
Created attachment 47841 [details]
Screenshot of task list showing Japanese and English text

Task list in KDE 4.5beta2 (Kubuntu package) shows Japanese text in white while English text in black.
Comment 17 Yaohan Chen 2010-06-10 02:19:01 UTC
(In reply to comment #15)
> Created an attachment (id=47840) [details]
> Screenshot of krunner displaying Japanese and English characters
> 
> Krunner in KDE 4.5beta2 (Kubuntu package) displays Japanese text in white while
> English text in black. This is done with the google-translator-runner plugin.

Some Japanese characters are black in the screenshot, because they are not in a bitmap font. I have a few Chinese fonts installed, so sometimes a piece of Japanese text gets displayed in mixed fonts.
Comment 18 Beat Wolf 2010-09-02 11:46:36 UTC
*** Bug 248365 has been marked as a duplicate of this bug. ***
Comment 19 Kolia 2011-12-08 17:59:14 UTC
Hi, are you still experiencing this issue with a newer version of KDE?
Comment 20 Myriam Schweingruber 2012-05-16 09:26:31 UTC
Closing for lack of feedback. Feel free to reopen this report if you can reproduce it with KDE 4.8.3 or later.