Summary: | Patch for fontconfig and Xft2 when redering CJK characters | ||
---|---|---|---|
Product: | xorg | Reporter: | Wang <fundawang> |
Component: | Lib/Xft | Assignee: | Keith Packard <keithp> |
Status: | CLOSED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | high | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Wang
2003-07-16 11:12:45 UTC
If you could submit individual bugs with a description of the problem and solution, I'd have a chance of understanding what issues need fixing in each library. I already have plans for extracting local family and style names so that applications can present them to users, I'm not sure what other things need fixing. OK, I would explain more intensively to show what the individual patch would do. Xft2 Patch=============== http://firefly.idv.tw/setfont-xft/patches/Xft2/xft-2.1.2-CJK-fixwidth- embededbitmaps-artificial_bold-20030606.patch 1. Try to use emebed bitmap font within Chinese font instead of rendering from vectors. 2. Many Chinese font does not supply bold or italic style within itself. When bold style is requested during rendering, Xft2 will likely render it as normal style. The patch will try to generate dynamiclly bold style from normal style (bold emulation). 3. Xf2 uses font->public.max_advance_width to detect the width which will be used in rendering. But it is not applicatable in Chinese, as Chinese font have half-width and full-width characters within single font. The patch will change to glyphslot->metrics.vertAdvance and glyphslot->metrics.horiAdvance. fontconfig=============== Patch 1: http://firefly.idv.tw/setfont-xft/patches/fontconfig/fontconfig-2.2.1- multifamily-20030618.patch Support Chinese font name, which you are planning to. Patch 2: http://firefly.idv.tw/setfont-xft/patches/fontconfig/fontconfig-2.2.1- include_CJK_charmaps-20030626.patch.gz fontconfig can use font with unicode cmap or native cmap. With the latter one, it will convert native cmap into unicode. But it does not include the cmap of CJK, so supporting Chinese fonts which only have native cmap but not unicode cmap would be impossible. The patch gives you such a cmap. Patch 3: http://firefly.idv.tw/setfont-xft/patches/fontconfig/fontconfig-2.2.1- fclang-miss_1_percent-20030617.patch Some very old font does not fill the cmap completely. That means, maybe very few characters supplied with the font is missing in the font. This patch allow 1% characters missing in the font. Of course, this patch may not need to be merged, as the case rarely occurs. recently I reported a bug related with this report on the bugzilla of the xfree86 Summary: crashed rendering result with embeded bitmap(sbit) and anti-aliased text http://bugs.xfree86.org/show_bug.cgi?id=649 and I found that the crashed rendering bug is fixed on the Xft2 2.1.2 but some unexpected results are also found on the mozilla related with embeded bitmaps (sbit). I'll take screenshots and post it on. and Akito also makes some CJK related patches several month ago: http://www.kde.gr.jp/~akito/patch/fcpackage/ In fact, firefly's patch is based on Akito's, only that there are some mistakes on Chinese in the one Akito has made. Firefly has corrected this mistakes, and applied some more tweaks on visual effects. |
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.