Bug 381311 - Remove /etc/fonts/conf.d/85-wqy-bitmapsong.conf
Remove /etc/fonts/conf.d/85-wqy-bitmapsong.conf
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: wqy-bitmap-fonts (Show other bugs)
rawhide
All Linux
high Severity low
: ---
: ---
Assigned To: Qianqian Fang
Fedora Extras Quality Assurance
:
: 241551 379351 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-13 18:49 EST by Behdad Esfahbod
Modified: 2008-02-06 18:35 EST (History)
6 users (show)

See Also:
Fixed In Version: 0.9.9-2.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-26 13:46:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The reported bug can not be repeated (277.40 KB, image/png)
2007-11-14 18:53 EST, Qianqian Fang
no flags Details
The reported bug can not be repeated II (for zh_CN locales) (308.02 KB, image/png)
2007-11-14 18:56 EST, Qianqian Fang
no flags Details
Before the fix: misalignment of Latin for monospace (console) (12.36 KB, image/png)
2007-11-22 19:48 EST, Qianqian Fang
no flags Details
After the fix: monospace is displayed by vector font, Chinese will use wqy (60.73 KB, image/png)
2007-11-22 19:51 EST, Qianqian Fang
no flags Details
Firefox with wrong monospaced font in input area (63.77 KB, image/png)
2007-11-23 05:13 EST, Andreas M. Kirchwitz
no flags Details
Firefox with correct monospaced font in input area (48.75 KB, image/png)
2007-11-23 05:13 EST, Andreas M. Kirchwitz
no flags Details
fc-match -s monospace with wqy-bitmap-fonts installed (2.11 KB, text/plain)
2007-11-23 05:14 EST, Andreas M. Kirchwitz
no flags Details
fc-match -s monospace without wqy-bitmap-fonts installed (1.90 KB, text/plain)
2007-11-23 05:15 EST, Andreas M. Kirchwitz
no flags Details
Firefox Font Configuration (16.72 KB, image/png)
2007-11-23 14:40 EST, Andreas M. Kirchwitz
no flags Details

  None (edit)
Description Behdad Esfahbod 2007-11-13 18:49:23 EST
That's the stupidest config file I've ever seen.  Please DON'T install it.

ref: https://bugzilla.mozilla.org/show_bug.cgi?id=403647
Comment 1 Qianqian Fang 2007-11-13 20:57:47 EST
I believe that if you provide your "smart" ideas to help improve the rendering
setting of this font, it will be much better than throwing cold words to your
peer developers.

If you are an expert on fontconfig, please advise me how to write a conf file to
make this font be the default font when rendering Chinese characters (sans,
serif or mono), while using vector fonts for non-Chinese characters.

The reason that we raised the priority of this font is because the vector font
rendering of Chinese is terrible and hard to read, and the embedded bitmaps of
the default Chinese font, UMing, are neither complete nor optimized
(wqy-bitmap-fonts is based on those bitmaps and experienced 3 years of manual
fine-tuning). Because Uming is APL and not compatible with GPL, we are unable to
merge this to Uming.
Comment 2 Nicolas Mailhot 2007-11-14 04:10:42 EST
1. Please post your fontconfig ruleset on fedora-fonts-list@redhat.com for review.

2. Due to longstanding fontconfig deficiencies you can not change font settings
just for chinese users, or just for the CJK blocks within your font. That means:
 — your font priority needs to be lower than every other font that ships vector
fonts for non-Chinese characters, or you will stomp on those characters, and
users will complain. 
 — or you need to cull every non-CJK glyph from your font.

Please bug the fontconfig developpers to get fontconfig fixed if that is
inconvenient for you. I hear there are lots of people in China.

3. Another core problem is that some western developers have decided 96dpi is
good enough for screen text rendering and it's easier to force this resolution
than figuring out how to manage font scaling properly. (there is a large group
of them within GNOME). That prevents chinese users from getting higher-dpi
screens or using them in high-dpi mode if they already have them. If this
software limitation was lifted, CJK users could use screens with a sufficient
pixel density to render vector fonts properly without resorting to bitmap hacks.

Please bug the GNOME developpers so they handle high-dpi screens properly and
you can migrate from bitmap fonts mid-term instead of exhausting yourself
pushing a bitmap workaround like you're doing right now. Higher dpi screens have
been economically doable on a mass scale for a long time (and some vendors have
shipped them, and even a low-cost system like the OLPC has a high-dpi screen),
what prevents mass availability is software that refuses to support them.

The fedora fontconfig policy is there:
http://fedoraproject.org/wiki/SIGs/Fonts/Packaging/Fontconfig
Comment 3 Qianqian Fang 2007-11-14 18:53:51 EST
Created attachment 259111 [details]
The reported bug can not be repeated

This figure shows Fedora 8 under en_US locale when wqy-bitmap-fonts was
installed.

Latin fonts were displayed nicely with vector fonts. The wqy-bitmap-fonts does
not show up at all, even for rendering Chinese (we hoped that it could be used
in this case). From this figure, you can also see how vague the vector
rendering of Chinese characters. This has been complained for years, and almost
all people I know would replaced the blurry vector font by a bitmap Chinese
font or a hinted commercial font.
Comment 4 Qianqian Fang 2007-11-14 18:56:37 EST
Created attachment 259121 [details]
The reported bug can not be repeated II (for zh_CN locales)

This one shows that even under Chinese locale (zh_CN), the Latin fonts were not
replaced by wqy-bitmap-fonts. Only Chinese characters were rendered by
wqy-bitmap-fonts. This makes the reading much more pleasant.
Comment 5 Andreas M. Kirchwitz 2007-11-22 17:23:41 EST
I'm not sure if that happend quite from the beginning of the
fresh F8 install, but at least after the latest update of the
wqy-bitmap-fonts package (0.9.9-1.fc8.noarch), the monospace
font in Firefox and Thunderbird was broken. No matter what
you configured there, you always got some Courier-looking
anti-aliased font. Only the font size was respected.

After removing /etc/fonts/conf.d/85-wqy-bitmapsong.conf
(or the complete wqy-bitmap-fonts package), everything was
fine again.
Comment 6 Qianqian Fang 2007-11-22 19:48:43 EST
Created attachment 267231 [details]
Before the fix: misalignment of Latin for monospace (console)

Before the patch, terminal will use wqy-bitmap-fonts for displaying Latin
characters (zh_CN locale), notice the "m/w/M/W" have overlaps to the next
characters.
Comment 7 Qianqian Fang 2007-11-22 19:51:37 EST
Created attachment 267241 [details]
After the fix: monospace is displayed by vector font, Chinese will use wqy

After the patch, the Latin glyphs uses vector fonts (Dejavu LSG Sans Mono),
while Chinese characters use wqy-bitmap-fonts.
Comment 8 Qianqian Fang 2007-11-22 19:55:11 EST
could you please attach a screenshot to illustrate your problem (before and
after using wqy-bitmap-fonts)? and, can you provide your locale and the output
of the following command: 
  fc-match -s "monospace:size=9pt" | head -10

The default wqy-bitmap-fonts installation (0.9.9-0) did not handle monospace
font rendering order properly. In console or other monospace environment,
fontconfig chooses to use the Latin glyphs in wqy-bitmap-fonts to display Latin
char and numbers. Because they are not monospaced, this caused misalignment of
characters in console (if one chooses monospace font), see Attachment #267231 [details].

In the new update (0.9.9-1), I perpended the system default monospace font
"DejaVu LGC Sans Mono" right before "WenQuanYi Bitmap Song". This will use
Dejavu Sans Mono to render Latin/numbers while using wqy-bitmap-song to render
Chinese for monospace environment. (see Attachment #267241 [details]). 
Comment 9 Andreas M. Kirchwitz 2007-11-23 05:13:14 EST
Created attachment 267421 [details]
Firefox with wrong monospaced font in input area
Comment 10 Andreas M. Kirchwitz 2007-11-23 05:13:52 EST
Created attachment 267431 [details]
Firefox with correct monospaced font in input area
Comment 11 Andreas M. Kirchwitz 2007-11-23 05:14:49 EST
Created attachment 267441 [details]
fc-match -s monospace with wqy-bitmap-fonts installed
Comment 12 Andreas M. Kirchwitz 2007-11-23 05:15:24 EST
Created attachment 267451 [details]
fc-match -s monospace without wqy-bitmap-fonts installed
Comment 13 Andreas M. Kirchwitz 2007-11-23 05:19:57 EST
The command 'fc-match -s "monospace:size=9pt" | head -10'
does not show any difference, so I've appended the output of
'fc-match -s monospace' if that is of any help.

The attached pictures (snapshots of this bugzilla ticket ;-)
show and describe the problem (see and read the input text-area
within the pictures).
Comment 14 Qianqian Fang 2007-11-23 13:33:51 EST
can you post your locale (run "locale" in a terminal)? 
also if you can upload a screen capture of the firefox font configuration dialog
(menu Edit\Preferences\Content\Font&Color\Advanced) with the "correct"
configuration, that would be very helpful for me to do tests.

thank you
Comment 15 Behdad Esfahbod 2007-11-23 14:35:06 EST
(In reply to comment #2)

> 2. Due to longstanding fontconfig deficiencies you can not change font settings
> just for chinese users, or just for the CJK blocks within your font.

Nicolas, this is not true.  For Pango (and by extension Firefox) you can.  I've
posted this before to the fontconfig list.  For example:

        <match>
                <test name="lang" compare="contains">
                        <string>zh-cn</string>
                </test>
                <edit name="family" mode="prepend" binding="same">
                        <string>Whatever</string>
                </edit>
        </match>

Works.
Comment 16 Andreas M. Kirchwitz 2007-11-23 14:40:08 EST
Created attachment 267791 [details]
Firefox Font Configuration
Comment 17 Behdad Esfahbod 2007-11-23 14:41:34 EST
(In reply to comment #1)
> I believe that if you provide your "smart" ideas to help improve the rendering
> setting of this font, it will be much better than throwing cold words to your
> peer developers.
> 
> If you are an expert on fontconfig, please advise me how to write a conf file to
> make this font be the default font when rendering Chinese characters (sans,
> serif or mono), while using vector fonts for non-Chinese characters.
> 
> The reason that we raised the priority of this font is because the vector font
> rendering of Chinese is terrible and hard to read, and the embedded bitmaps of
> the default Chinese font, UMing, are neither complete nor optimized
> (wqy-bitmap-fonts is based on those bitmaps and experienced 3 years of manual
> fine-tuning). Because Uming is APL and not compatible with GPL, we are unable to
> merge this to Uming.

You should only append to the generic aliases, never prepend.  Just do that
before Uming gets a chance to do it.  Mail fedora-fonts-list and we can help
you.  In the mean time, please remove that file before more bug reports come in.

Comment 18 Andreas M. Kirchwitz 2007-11-23 14:54:06 EST
The font names "Zelvetica" and "Zourier" you see in my font config
are old friends. In fact, these fonts are copies of the old bitmap fonts
"Helvetica" and "Courier" which lived in /usr/X11R6/lib/X11/fonts/(75|100)dpi
in older RHL/Fedora releases. I simply made a copy of them and renamed all
occurences of "Helvetica" and "Courier" with "Zelvetica" and "Zourier" to avoid
naming conflicts with the new anti-aliased fonts of the same name.

Output of "locale":

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Comment 19 Qianqian Fang 2007-11-23 15:52:11 EST
to Behdad:

ok, I will remove this file for now and hopefully we can figure out a more
robust solution in a relatively short time scale, with the inputs from
fedora-fonts-list (we may get bug reports filed from Chinese users if this
config file is removed).

I will also send a detailed email to fedora-fonts-list and elaborate the
motivation, goals and potential problems of setting up a pleasing Chinese
environment using wqy's fonts.


to Andreas: 

I apologize for the complication due to this config file, before we properly
handle the font matching problems of both Latin&Chinese characters, please
temporarily remove wqy-bitmap-fonts to restore your default settings. I will let
you know when the new config file is committed if you choose to use
wqy-bitmap-fonts in the future.
Comment 20 Behdad Esfahbod 2007-11-23 16:57:27 EST
Thanks Qianqian.  Excuse my tone if I offended you earlier.  Didn't mean to.
Comment 21 Qianqian Fang 2007-11-23 23:26:56 EST
hi Behdad, that's no problem. 

I just sent a long email to fedora-fonts-list, and I hope that you may have time
to read it and give me advices to improve this config file.

thanks
Comment 22 Fedora Update System 2007-11-26 13:46:50 EST
wqy-bitmap-fonts-0.9.9-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 23 Rex Dieter 2007-11-27 07:50:27 EST
*** Bug 379351 has been marked as a duplicate of this bug. ***
Comment 24 Kevin Kofler 2008-01-26 06:56:14 EST
*** Bug 241551 has been marked as a duplicate of this bug. ***
Comment 25 Kevin Kofler 2008-01-26 06:59:34 EST
I see you only pushed this to F8, can you please push it to F7 too? (FC6/FE6 is 
no longer supported, unfortunately.)
Comment 26 Qianqian Fang 2008-01-26 16:59:47 EST
hi Kevin

a new fontconfig file was provided with the inputs from fedora-font-list. 
you can find it at 

http://www.redhat.com/archives/fedora-fonts-list/2007-December/msg00002.html

(save the attached fontconfig file as /etc/fonts/conf.d/61-wqy-bitmapsong.conf)

this is the one currently used in devel, and seems working fine with non-zh
locales (Jens and his colleagues had tested it).

Can you remove 85-wqy-bitmapsong.conf, and install 61-wqy-bitmapsong.conf on
your system? if things are working fine, I would be glad to push it to F7.

Comment 27 Jens Petersen 2008-02-06 18:35:22 EST
Might be better to clone a bug for F7?

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