Red Hat Bugzilla – Bug 136922
Xft does not render japanese bold fonts correctly.
Last modified: 2007-11-30 17:10:52 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001
Description of problem:
Xft does not render japanese bold fonts.
Instead it renders plain fonts for kanji characters.
I found the patch for correct this problem at the site bellow.
Reffering to the patch, I'm making the patch which corrects the
problem and which fit to fc2. I'll submit it later!
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run gnome session, for example.
Actual Results: Japanese characters which should be bold are not
rendered as bold fonts.
Only the non japanese fonts are rendered as bold fonts.
Expected Results: All chacaters which is set to be bold are rendred
as bold fonts.
Some people says xft renders japanese bold fonts IF you have the fonts
with additional informations for the bold shapes. But many japanese
fonts (including Kochi Mincho) have no informations for the bold
Created attachment 105686 [details]
This patch makes xft render japanese bold fonts correctly.
You also need to edit /etc/fonts/fonts.conf to make it enable.
Created attachment 105687 [details]
Apply this patch to enable japanese bold fonts.
Created attachment 105702 [details]
By this patch, xft render the requested fonts (bold, italic) even when does exists.
I've hacked the patch a little more.
The effect of this patch is very simple.
Xft makes up virtual fonts only if you request the bold font or the italic font
that has no such information in the font file.
So this patch will not affect the fonts with bold shapes and italic shapes (for
example, Bitstream Vera *).
Only the fonts without the bold shapes and italic shapes are affected.
The monospaced virtual fonts made by this patch looks a bit strange.
I'll fix it and submit new patch later.
Created attachment 105703 [details]
This patch makes xft render japanese bold fonts correctly. New patch.
The problem around monospace fonts is fixed.
Created attachment 105704 [details]
This python script makes proper fonts.cache-1 files.
This python script will allow you test the effect of the patch.
It makes fonts.cache-1 files which contains the vertial italic and bold fonts
data.Then, you can see the vertial fonts by gnome-fonts-properties or
For example, if you want to make the vertial fonts for Kochi-gothic in
/usr/share/fonts/ja/TrueType/ directory, just run as follow.
./fc-cache-proper (-f) /usr/share/fonts/ja/TrueType
(I'm not sure if f = the force flag is needed. Try first without it.)
After that you can see bold and italic Kochi-gothic font in
Be careful, this script overwrite the old fonts.cache-1 files.
Plase test it, after you backup your old fonts.cache-1 files.
I would recommend that you post your patch to the xorg list
(firstname.lastname@example.org) for discussion and try to get it integrated
into the upstream Xorg release. Also for feature work such as this,
make sure you are working against the latest CVS snapshot. There is
also an upstream bugzilla (http://bugs.bugzilla.org) if you want to
post your patches there.
Thank you for replying.
After I post the patch, I've found that the problem is more
complicated than I thought.
This patch only affect the xft, but many applications use freetype for
So I need another patch for make it completely.
Again, thanks you for the information, and replying.