Bug 136922

Summary: Xft does not render japanese bold fonts correctly.
Product: [Fedora] Fedora Reporter: ryo dairiki <nue11298>
Component: xorg-x11Assignee: X/OpenGL Maintenance List <xgl-maint>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-08 22:09:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
This patch makes xft render japanese bold fonts correctly.
none
Apply this patch to enable japanese bold fonts.
none
By this patch, xft render the requested fonts (bold, italic) even when does exists.
none
This patch makes xft render japanese bold fonts correctly. New patch.
none
This python script makes proper fonts.cache-1 files. none

Description ryo dairiki 2004-10-23 07:53:18 UTC
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 08:47:51 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.

Comment 2 ryo dairiki 2004-10-23 09:07:16 UTC
Created attachment 105687 [details]
Apply this patch to enable japanese bold fonts.

Comment 3 ryo dairiki 2004-10-24 09:52:41 UTC
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 11:48:32 UTC
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 12:00:04 UTC
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 22:09:41 UTC
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

Comment 7 ryo dairiki 2004-11-13 09:49:07 UTC
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.