Bug 136922
Description
ryo dairiki
2004-10-23 07:53:18 UTC
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
something.
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
gnome-font-properties.
Be careful, this script overwrite the old fonts.cache-1 files.
Plase test it, after you backup your old fonts.cache-1 files.
Hi, I would recommend that you post your patch to the xorg list (xorg) 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. Thanks, Kristian 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 font rendering. So I need another patch for make it completely. Again, thanks you for the information, and replying. |