Bug 2420

Summary: No artificial bold style for CJK characters
Product: xorg Reporter: Funda Wang <fundawang>
Component: Lib/XftAssignee: Keith Packard <keithp>
Status: CLOSED NOTABUG QA Contact:
Severity: normal    
Priority: high CC: abelcheung, fundawang
Version: unspecified   
Hardware: x86 (IA32)   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Funda Wang 2005-01-30 01:03:54 UTC
Currently, there is no artificial bold style arithmetic for CJK characters, due 
to the complex glyphs of those characters.

I'm not a programmer nor hacker, but I'm glad to recommend following patch to 
libxft, which implemented the artificial bold style to CJK chracters. Both of 
them are being widely used in CJK community. You can choose the one which is 
best in the view of libxft maintainer.
Comment 1 Funda Wang 2005-01-30 01:06:55 UTC
Patch 1: made by a Japanese hacker named akito <akito@kde.gr.jp>
http://www.kde.gr.jp/~akito/patch/fontconfig/xft-2.1.1/xft-2.1.1-MakeBold-
20040405.patch

This patch are for xft 2.1.1, but I'm sure with some minor fixes it can be 
appied into CVS HEAD.
Comment 2 Funda Wang 2005-01-30 01:12:19 UTC
Patch 2: made by a Chinese hacker named Firefly <firefly@firefly.idv.tw>
http://firefly.idv.tw/setfont-xft/patches/libXft/2.1.6/libXft-2.1.6-CJK-extra-
20041128.patch

The patch applies to libxft 2.1.6, including artificial bold style to CJK 
characters and some critical fix on CJK characters(such as miscalculated width 
for full-width and half-width glyphs within same font).
Comment 3 Funda Wang 2005-02-17 19:53:32 UTC
What is the status of this enhancement?
Comment 4 Keith Packard 2005-02-28 11:53:44 UTC
I've added infrastructure to Xft and fontconfig to pass an 'embolden' flag from
the font configuration through to the rasterizer. Right now, that's hooked up
only to the FreeType FT_GlyphSlot_Embolden API.

I'd like to see a patch which used this flag to embolden bitmaps as well, but I
want to keep it separate from other CJK issues.
Comment 5 Funda Wang 2005-02-28 20:58:28 UTC
Personally, I don't like FT_GlyphSlot_Embolden, due to it is not being 
maintained for a while, and is not enabled by default. And, it has nothing to do 
with bitmap glyphs(bdf/pcf). But bitmap glyphs is highly required in CJK 
characters.

Furthermore, it might misrender the glyph of CJK characters, badly worse than 
current auothint. If you want I would like to post several snapshot on this.

Patching FT_GlyphSlot_Embolden means it should be rewritten completely. So it is 
not an acceptable choice than just patching libxft itself.
Comment 6 Keith Packard 2005-02-28 21:03:14 UTC
I have no opinion on the value of the outline emboldening code, I only used it
to demonstrate that the rest of the emboldening path was working correctly, from
fontconfig through Xft.  With this in place, adding bitmap emboldening should be
relatively easy, using the same 'embolden' boolean now available in the font
information record.
Comment 7 Keith Packard 2005-03-01 20:40:36 UTC
*** Bug 102 has been marked as a duplicate of this bug. ***
Comment 8 Funda Wang 2005-03-12 15:59:35 UTC
This patch include other fix to libxft. I'll create another bugreport on this 
issue.
Comment 9 Funda Wang 2005-05-28 20:00:11 UTC
It seems that freetype has already implemented FT_GlyphSlot_Embolden. What do 
you think about it?
Comment 10 Keith Packard 2005-05-29 03:11:00 UTC
Xft supports the FT embolden stuff when present, but it isn't generally built as
it's considered experimental.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.