Bug 459680 - qt/kde: font antialiasing was disabled by uming fontconfig file.
Summary: qt/kde: font antialiasing was disabled by uming fontconfig file.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: qt
Version: 10
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Caius Chance
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F10Target
TreeView+ depends on / blocked
 
Reported: 2008-08-21 05:26 UTC by Michel Lind
Modified: 2009-11-04 06:40 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-02-06 06:28:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch (381 bytes, patch)
2008-09-29 03:57 UTC, Caius Chance
no flags Details | Diff
patch (1.30 KB, patch)
2008-09-29 03:59 UTC, Caius Chance
no flags Details | Diff
Modified .conf from Baif's. (1.93 KB, text/plain)
2008-11-04 00:03 UTC, Caius Chance
no flags Details
Screenshot (94.54 KB, image/png)
2009-01-28 08:35 UTC, Caius Chance
no flags Details
Screen with .conf in last comment. (155.17 KB, image/png)
2009-02-03 00:20 UTC, Caius Chance
no flags Details

Description Michel Lind 2008-08-21 05:26:25 UTC
Description of problem:
The font rendering in Rawhide's Qt 4.4.1 is much inferior to that in Fedora 9. The glyphs appear really thin, as if no hinting is being done.

Version-Release number of selected component (if applicable):
4.4.1-2 (not sure when the problem started; was noticeable in F10 alpha and still persists)

How reproducible:
Always

Steps to Reproduce:
1. Run qtconfig-qt4
2. Install kdegraphics and run okular
  
Actual results:
In both, font rendering looks terrible

Expected results:
Font rendering should look at least as well as in F9

Additional info:

Comment 1 Michel Lind 2008-08-21 05:27:27 UTC
Also, why does qt4-qtconfig.desktop have "NoDisplay=true" ?

Comment 2 Rex Dieter 2008-08-21 12:56:55 UTC
qtconfig, see bug #244879

Comment 3 Rex Dieter 2008-08-27 13:15:31 UTC
Seems to be a rawhide-specific problem, qt-4.4.1 on F-9 is fine for me.  When/if I make the jump to rawhide on a box of mine, I'll see if I can reproduce this.

Comment 4 Kevin Kofler 2008-08-27 22:43:59 UTC
There's a new freetype in Rawhide, that might be what causes this.

Comment 5 Rex Dieter 2008-09-24 14:00:11 UTC
I can reproduce this with F10-beta.

Comment 6 Rex Dieter 2008-09-24 14:04:43 UTC
interesting, in systemsettings -> Appearance -> Fonts, Use Antialiasing
"system default" => no antialiasing.  
"Enabled" => ok

and... when I reset back to "system default", things stay ok.  freaky

Comment 7 Rex Dieter 2008-09-24 14:12:20 UTC
Reassigning to kdebase-workspace (for now, though there's no doubt some qt/kde interaction going on here)

Comment 8 Than Ngo 2008-09-24 14:30:58 UTC
i cannot reproduce this with kde-4.1.1/F9. how can i reproduce this with kde-4.1.1/F9?

Comment 9 Jaroslav Reznik 2008-09-24 14:47:32 UTC
(In reply to comment #8)
> i cannot reproduce this with kde-4.1.1/F9. how can i reproduce this with
> kde-4.1.1/F9?

It's Rawhide/F10 specific problem, it is working in F9...

Comment 10 Michel Lind 2008-09-24 15:50:07 UTC
The same problem affects pure Qt applications. KDE's systemsettings is presumably just using/editing Qt's antialiasing settings? In which case, the defaults might for some reason be broken on F10.

Comment 11 Kevin Kofler 2008-09-25 00:19:23 UTC
Maybe this is due to the new freetype in Rawhide?

Comment 12 Jaroslav Reznik 2008-09-25 14:16:47 UTC
(In reply to comment #11)
> Maybe this is due to the new freetype in Rawhide?

Quick try with Freetype from F9 and it is same (but really quick try) 2.37-1 to 2.3.5-6

Comment 13 Than Ngo 2008-09-25 22:23:53 UTC
it's a bug in /etc/fonts/conf.d/25-ttf-arphic-uming-bitmaps.conf from cjkunifonts-uming that sets antialias=false for pixelsize <= 17. It causes the qt/kde font antialiasing not used initially.

Is there any reason why you set antialias=false for pixelsize <= 17?

PS: if someone cannot wait for the fix, just remove this package cjkunifonts-uming

Comment 14 Michel Lind 2008-09-26 00:27:20 UTC
Sounds like a configuration problem -- presumably that antialias=false is meant to apply only to uming and not to *all* the fonts?

The weird thing is, why does it only affect Qt/KDE?

Comment 15 Caius Chance 2008-09-26 01:07:26 UTC
In main user's point of view, this is what it supposed to be a feature rather
than a bug.

AFAIK, since cjkunifonts-uming has no hinting data but that is the default font
of zh_TW locale, antialias=false for pixelsize <= 17 is somewhat necessary for
any user who uses such font with best display quality.

People who doesn't need Chinese (Traditional) support should not choose that
during installation or later, until at least latest Gnone and KDE support by
font antialias rendering on same display.

To conclude, IMHO this is not a bug.

Comment 16 Michel Lind 2008-09-26 02:04:45 UTC
IMHO this *is* a bug. Either cjkunifonts-uming is overriding antialias globally, or Qt is parsing the request wrongly and turn off antialiasing for all fonts, and not just the fonts for Chinese (Traditional) support.

Comment 17 Kevin Kofler 2008-09-26 03:38:04 UTC
A font package must not override global antialiasing settings. Just because a font for traditional Chinese is installed doesn't mean traditional Chinese is the primary language the current user is using, especially on multiuser systems. Several font packages are also installed by default on the live CDs.

Comment 18 Jaroslav Reznik 2008-09-26 08:16:45 UTC
This is definitely BUG - it affects another package and makes it totally unusable in default settings. The question is why is it affecting all fonts globally and not only these ones defined in font family test.

Comment 19 Nicolas Mailhot 2008-09-26 18:03:26 UTC
(In reply to comment #15)
> People who doesn't need Chinese (Traditional) support should not choose that
> during installation or later, 

No that's not acceptable — font packages must not assume any system locale and be installable without side-effects on any system. This point has already been discussed to death last year on the fonts list.

(In reply to comment #16)
> IMHO this *is* a bug. Either cjkunifonts-uming is overriding antialias
> globally, or Qt is parsing the request wrongly and turn off antialiasing for
> all fonts, and not just the fonts for Chinese (Traditional) support.

I'd even go further, the font has no business changing the settings of any font but itself. If it tries that's a bug in the font package. If it uses the proper checks but QT ignores then that's a QT bug.

Looking at the file, the package does try to limit the antialias effect to a set of fonts. So either the check is badly written, and it's a font package bug, or the syntax is ok, and something QT-side makes a mess of it. Behdad should probably be able to tell you if the check is correctly written.

Comment 20 Jens Petersen 2008-09-29 00:30:14 UTC
Just to confirm, could you also try testing with cjkunifonts-0.1.20060928 (the version that was also in f9) -- the latest f10 package is a new upstream release.

Comment 21 Caius Chance 2008-09-29 03:57:23 UTC
Created attachment 317907 [details]
patch

Comment 22 Caius Chance 2008-09-29 03:59:04 UTC
Created attachment 317908 [details]
patch

Comment 24 Jaroslav Reznik 2008-09-29 07:11:32 UTC
Antialiasing is on again.

Comment 25 Than Ngo 2008-09-29 12:51:42 UTC
it fixes the problem. Could you please build it in rawhide? thanks

Comment 26 Caius Chance 2008-09-29 22:44:48 UTC
http://koji.fedoraproject.org/koji/taskinfo?taskID=851180

done

Comment 27 Jens Petersen 2008-09-30 08:15:59 UTC
I still don't understand the real cause of the problem.  Of course we can move 25-ttf-arphic-uming-bitmaps.conf to /etc/fonts/conf.avail/, though Debian also ships it in conf.d/.

Caius, can you please ask upstream about?

Comment 28 Jens Petersen 2008-09-30 08:17:56 UTC
It is also a bit hard to test this since current rawhide KDE does not seem to be usable...

Comment 29 Kevin Kofler 2008-09-30 08:24:22 UTC
Uh, Rawhide KDE is supposed to be usable. It's the stable 4.1.2 release, not some alpha or beta.

Comment 30 Jens Petersen 2008-09-30 08:35:03 UTC
(In reply to comment #29)
> Uh, Rawhide KDE is supposed to be usable. It's the stable 4.1.2 release, not
> some alpha or beta.

Yeah one would hope so, but recently when I groupinstall kde-desktop and try it out it just sits there staring at me after startup, I suppose I could file a bug if it is not known...


Is it possible to reproduce the problem when running kde applications under gnome?

Comment 31 Akira TAGOH 2008-09-30 09:07:42 UTC
Something what exactly 25-ttf-arphic-uming-bitmaps.conf does is supposed to apply changes for Chinese fonts only as it's trying to match them. that exactly affected to other fonts right. that may be an idea to get rid of them for a /workaround/. but that looks to me like the real problem is in Qt or fontconfig. otherwise matching tag and testing tag becomes meaningless.

Comment 32 Jens Petersen 2008-10-01 07:07:28 UTC
Agreed, reproduced on F10Beta, but pushing this back to Qt since it really looks like a Qt/KDE issue: the changes made to cjkunifonts are just a workaround for this for KDE and the original .conf file clearly should only affect the Chinese font.

Comment 33 Kevin Kofler 2008-10-01 07:19:56 UTC
Might this be the relevant difference?
-	  <test name="family">
+	  <test name="family" compare="eq">

Comment 34 Akira TAGOH 2008-10-01 11:25:53 UTC
/etc/fonts/fonts.dtd defines that "compare" attribute defaults "eq".

<!ATTLIST test 
	  qual (any|all|first|not_first)    "any"
	  name CDATA	    #REQUIRED
	  target (pattern|font|default)		"default"
	  compare (eq|not_eq|less|less_eq|more|more_eq|contains|not_contains)	"eq">

Comment 35 Baif 2008-10-31 02:06:57 UTC
 It's true that "A font package must not 
override global antialiasing settings.".

    Please read the conf I had modified a little bit which enclosed with this 
reply. And it should replace:
    "/etc/fonts/conf.d/25-ttf-arphic-uming-bitmaps.conf"

Comment 36 Baif 2008-10-31 02:12:14 UTC
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>

 <match target="font" >
          <test name="family" compare="not_eq">
          <string>AR PL UMing CN</string>
          <string>AR PL UMing HK</string>
          <string>AR PL UMing TW</string>
          <string>AR PL UMing TW MBE</string>
          </test>
  <edit mode="assign" name="rgba" >
   <const>none</const>
  </edit>
 </match>
 <match target="font" >
          <test name="family" compare="not_eq">
          <string>AR PL UMing CN</string>
          <string>AR PL UMing HK</string>
          <string>AR PL UMing TW</string>
          <string>AR PL UMing TW MBE</string>
          </test>
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
 </match>
 <match target="font" >
          <test name="family" compare="not_eq">
          <string>AR PL UMing CN</string>
          <string>AR PL UMing HK</string>
          <string>AR PL UMing TW</string>
          <string>AR PL UMing TW MBE</string>
          </test>
  <edit mode="assign" name="hintstyle" >
   <const>hintfull</const>
  </edit>
 </match>
 <match target="font" >
          <test name="family" compare="not_eq">
          <string>AR PL UMing CN</string>
          <string>AR PL UMing HK</string>
          <string>AR PL UMing TW</string>
          <string>AR PL UMing TW MBE</string>
          </test>
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>

 <match target="font" >
          <test name="family">
          <string>AR PL UMing CN</string>
          <string>AR PL UMing HK</string>
          <string>AR PL UMing TW</string>
          <string>AR PL UMing TW MBE</string>
          </test>
  <test compare="more_eq" name="size" qual="any" >
   <double>8</double>
  </test>
  <test compare="less_eq" name="size" qual="any" >
   <double>12</double>
  </test>
  <edit mode="assign" name="antialias" >
   <bool>false</bool>
  </edit>
 </match>
 <match target="font" >
          <test name="family">
          <string>AR PL UMing CN</string>
          <string>AR PL UMing HK</string>
          <string>AR PL UMing TW</string>
          <string>AR PL UMing TW MBE</string>
          </test>
  <test compare="more_eq" name="pixelsize" qual="any" >
   <double>11</double>
  </test>
  <test compare="less_eq" name="pixelsize" qual="any" >
   <double>17</double>
  </test>
  <edit mode="assign" name="antialias" >
   <bool>false</bool>
  </edit>
 </match>
</fontconfig>

Comment 37 Akira TAGOH 2008-10-31 03:20:05 UTC
I'm afraid the part of the above config doesn't do the right thing what you said at least. "not_eq" affects all of fonts except you explicitly described there. it exactly overrides the global settings, regardless of whether or not the result is same. fontconfig config that the font package owns should have its specific config only. otherwise it should be modified in one fontconfig has.

Comment 38 Baif 2008-11-01 14:25:48 UTC
(In reply to comment #37)
> I'm afraid the part of the above config doesn't do the right thing what you
> said at least. "not_eq" affects all of fonts except you explicitly described
> there. it exactly overrides the global settings, regardless of whether or not
> the result is same. fontconfig config that the font package owns should have
> its specific config only. otherwise it should be modified in one fontconfig
> has.

Yes... You're right.
Because I don't know why without  the "not_eq"-s the rest of configs do NOT work... 
I had mail the config to Caius Carlos CHANCE <cchance>, hope he could get it work.

Comment 39 Caius Chance 2008-11-03 23:53:29 UTC
AFAIK, cjkunifonts shouldn't use any not_eq in its .conf file because this might probably overrides global settings. The global settings are managed as whole but not this package. Even it tested working we aren't appropriate to include. Cheers.

Comment 40 Caius Chance 2008-11-04 00:03:44 UTC
Created attachment 322378 [details]
Modified .conf from Baif's.

(Reopened for Baif's proposed .conf)

I have slightly modified Baif's proposed .conf to using only "eq". This might be able to reduce effects to global settings.

Welcome for more discussion.

Comment 41 Baif 2008-11-04 07:10:24 UTC
I found it's not easy make all happy...

For QT4/KDE4 with my config in LANG=en_US.UTF8 on my PC, English fonts look fine  , Chinese fonts look fine. But if the "not_eq"s have gone, the English fonts would NOT with antialias, but why the GTK/GNOME apps would get the fonts to be with "antialias"? 

It looks that the config does not effect the GTK/GNOME apps.

Comment 42 Jens Petersen 2008-11-04 07:37:16 UTC
Do you mean you think it is a Pango bug?

Comment 43 Baif 2008-11-05 15:35:48 UTC
I'm not really understand the fontconfig with Pango and Qt.
But I think the default settings for Qt/KDE on Fedora is not as good as for GTK/GNOME. And I really understand international for Qt is not as good as GTK. :)

BTW: Why fonts for Qt/KDE with LANG=zh_CN.UTF8 had been change, which config file will make this happen? Thanks.

Comment 44 Bug Zapper 2008-11-26 02:50:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 45 Steven M. Parrish 2009-01-10 13:54:43 UTC
rdieter, kevin_kofler  upstream, wontfix or cantfix?

Comment 46 Rex Dieter 2009-01-10 15:03:35 UTC
shrug, upstream to trolltech would be the only sane way forward, imo.

That would require someone who's experiencing this, and reproduce with a minimal test case.  Any takers?

Comment 47 Jens Petersen 2009-01-22 01:14:43 UTC
Caius, could you do that, please?

Comment 48 Caius Chance 2009-01-28 08:35:42 UTC
Created attachment 330210 [details]
Screenshot

with rawhide and qt-4.4.3-13.fc11.i386

Comment 49 Baif 2009-01-30 14:03:43 UTC
For KDE-LiveCD, the following .fonts.conf works!
Caius, can you test it without the first part of "not_eq"?

<match target="font" >
          <test name="family" compare="not_eq">
          <string>AR PL UMing CN</string>
          <string>AR PL UMing HK</string>
          <string>AR PL UMing TW</string>
          <string>AR PL UMing TW MBE</string>
          </test>
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>

 <match target="font" >
          <test name="family">
          <string>AR PL UMing CN</string>
          <string>AR PL UMing HK</string>
          <string>AR PL UMing TW</string>
          <string>AR PL UMing TW MBE</string>
          </test>
  <test compare="more_eq" name="size" qual="any" >
   <double>8</double>
  </test>
  <test compare="less_eq" name="size" qual="any" >
   <double>12</double>
  </test>
  <edit mode="assign" name="antialias" >
   <bool>false</bool>
  </edit>
 </match>
 <match target="font" >
          <test name="family">
          <string>AR PL UMing CN</string>
          <string>AR PL UMing HK</string>
          <string>AR PL UMing TW</string>
          <string>AR PL UMing TW MBE</string>
          </test>
  <test compare="more_eq" name="pixelsize" qual="any" >
   <double>11</double>
  </test>
  <test compare="less_eq" name="pixelsize" qual="any" >
   <double>17</double>
  </test>
  <edit mode="assign" name="antialias" >
   <bool>false</bool>
  </edit>
 </match>
</fontconfig>

Comment 50 Baif 2009-01-30 14:44:04 UTC
Replace 25-ttf-arphic-uming-bitmaps.conf this conf, check if the Chinese are not antialias within the range.


BTW: qtconfig-qt4 will ignore the fontconfig ?

Comment 51 Caius Chance 2009-02-02 23:23:46 UTC
(In reply to comment #50)
> Replace 25-ttf-arphic-uming-bitmaps.conf this conf, check if the Chinese are
> not antialias within the range.

Could you kindly have a test? Thanks. BTW, would the first <match> too over-ruled to force all non-uming have antialias enabled?

=====

The two <match> are somehow overlapped:

11 >= pixelsize <= 17

OR

8 >= pixelsize <= 12

becomes

8 >= pixelsize <- 17

which font sizes 8 - 17 would have antialias disabled?

Comment 52 Caius Chance 2009-02-02 23:44:12 UTC
This makes when uming pixelsize < 17, has antialias and hinting off. Please kindly test:

=====

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

  <match target="font">
    <test name="family">
      <string>AR PL UMing CN</string>
      <string>AR PL UMing HK</string>
      <string>AR PL UMing TW</string>
      <string>AR PL UMing TW MBE</string>
    </test>
    <edit name="autohint"><bool>false</bool></edit>
  </match>

  <match target="font">
    <test name="family">
      <string>AR PL UMing CN</string>
      <string>AR PL UMing HK</string>
      <string>AR PL UMing TW</string>
      <string>AR PL UMing TW MBE</string>
    </test>
    <test name="pixelsize" compare="more_eq"><int>17</int></test>
    <edit name="antialias" mode="assign"><bool>true</bool></edit>
    <edit name="hinting" mode="assign"><bool>true</bool></edit>
  </match>
  
  <match target="font">
    <test name="family">
      <string>AR PL UMing CN</string>
      <string>AR PL UMing HK</string>
      <string>AR PL UMing TW</string>
      <string>AR PL UMing TW MBE</string>
    </test>
    <test name="pixelsize" compare="less"><int>17</int></test>
    <edit name="antialias" mode="assign"><bool>false</bool></edit>
    <edit name="hinting" mode="assign"><bool>false</bool></edit>
  </match>

</fontconfig>

Comment 53 Caius Chance 2009-02-03 00:20:23 UTC
Created attachment 330696 [details]
Screen with .conf in last comment.

Comment 54 Baif 2009-02-03 03:28:22 UTC
>1.Could you kindly have a test? Thanks. 
:( Sorry, since I got a new job, I have no additional resources... My personal laptop is running F8 with KDE 3.5. I only have a livecd for testing.

>2.BTW, would the first <match> too over-ruled to force all non-uming have 
>antialias enabled?
Yup. It seems that, this 25-ttfxxx-bitmap.conf disabled the antialias for other fonts in my f10 kde livecd. Where is this bug originated...

>3. The two <match> are somehow overlapped
I'm not sure of that. Since the targets are "size", and "pixelsize".

And The first "not_eq" match should be there to enabled antialias on F10 KDE LiveCD.

How about yours?

Comment 55 Caius Chance 2009-02-03 03:47:56 UTC
(In reply to comment #54)
> :( Sorry, since I got a new job, I have no additional resources... My personal
> laptop is running F8 with KDE 3.5. I only have a livecd for testing.

That' alright.

>2.BTW, would the first <match> too over-ruled to force all non-uming have 
> >antialias enabled?
> Yup. It seems that, this 25-ttfxxx-bitmap.conf disabled the antialias for other
> fonts in my f10 kde livecd. Where is this bug originated...

The .conf in comment #52 should not affect global antialias configuration.

> >3. The two <match> are somehow overlapped
> I'm not sure of that. Since the targets are "size", and "pixelsize".

Hmm I should get back and check what is the differences.

> And The first "not_eq" match should be there to enabled antialias on F10 KDE
> LiveCD.

I personally think whether antialias is enabled or not globally, should not be controlled by cjkuni-fonts.

Comment 56 Caius Chance 2009-02-03 03:57:29 UTC
Still looking for extra testing.

Comment 57 Baif 2009-02-03 05:23:14 UTC
Maybe, the reason for disabling antialias for other fonts is: Uming has alias
as Serif San fonts in the other conf file.

And KDE/Qt apps vs GNOME/GTK apps have different fonts display on Fedora.

Comment 58 Caius Chance 2009-02-04 00:52:38 UTC
Wait for feedback from rawhide users:

http://koji.fedoraproject.org/koji/buildinfo?buildID=81266

Comment 59 Baif 2009-02-09 14:16:29 UTC
How to get update to rawhide from Fedora Alpha KDE Live CD?

Comment 60 Caius Chance 2009-02-09 14:37:14 UTC
(In reply to comment #59)
> How to get update to rawhide from Fedora Alpha KDE Live CD?

Enable rawhide repo in /etc/yum.repos.d/ ?

Comment 61 Baif 2009-02-10 07:49:21 UTC
Could you test it in KDE? Things do not work out for me.

Comment 62 Caius Chance 2009-02-10 10:24:19 UTC
Could you tell me what is your testing env and procedures please?

Comment 63 Jens Petersen 2009-10-19 09:27:08 UTC
@Baif: so this is ok now?

Comment 64 Jens Petersen 2009-11-04 06:40:29 UTC
I removed the bitmap fontconfig in cjkuni-fonts-0.2.20080216.1-30.fc13.


Note You need to log in before you can comment on or make changes to this bug.