Bug 136922 - Xft does not render japanese bold fonts correctly.
Xft does not render japanese bold fonts correctly.
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: xorg-x11 (Show other bugs)
2
All Linux
medium Severity medium
: ---
: ---
Assigned To: X/OpenGL Maintenance List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-23 03:53 EDT by ryo dairiki
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-08 17:09:41 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)
This patch makes xft render japanese bold fonts correctly. (16.67 KB, patch)
2004-10-23 04:47 EDT, ryo dairiki
no flags Details | Diff
Apply this patch to enable japanese bold fonts. (633 bytes, patch)
2004-10-23 05:07 EDT, ryo dairiki
no flags Details | Diff
By this patch, xft render the requested fonts (bold, italic) even when does exists. (17.57 KB, patch)
2004-10-24 05:52 EDT, ryo dairiki
no flags Details | Diff
This patch makes xft render japanese bold fonts correctly. New patch. (17.79 KB, patch)
2004-10-24 07:48 EDT, ryo dairiki
no flags Details | Diff
This python script makes proper fonts.cache-1 files. (5.99 KB, patch)
2004-10-24 08:00 EDT, ryo dairiki
no flags Details | Diff

  None (edit)
Description ryo dairiki 2004-10-23 03:53:18 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001
Firefox/0.10.1

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.
http://www.kde.gr.jp/~akito/xft/patch_xft.htm

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):
xorg-x11-6.7.0-2

How reproducible:
Always

Steps to Reproduce:
1. Run gnome session, for example.
2.
3.
    

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.

Additional info:

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
characters.
Comment 1 ryo dairiki 2004-10-23 04:47:51 EDT
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.
Comment 2 ryo dairiki 2004-10-23 05:07:16 EDT
Created attachment 105687 [details]
Apply this patch to enable japanese bold fonts.
Comment 3 ryo dairiki 2004-10-24 05:52:41 EDT
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.
Comment 4 ryo dairiki 2004-10-24 07:48:32 EDT
Created attachment 105703 [details]
This patch makes xft render japanese bold fonts correctly. New patch.

The problem around monospace fonts is fixed.
Comment 5 ryo dairiki 2004-10-24 08:00:04 EDT
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.
Comment 6 Kristian Høgsberg 2004-11-08 17:09:41 EST
Hi,

I would recommend that you post your patch to the xorg list
(xorg@freedesktop.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.

Thanks,
Kristian
Comment 7 ryo dairiki 2004-11-13 04:49:07 EST
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.

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