[poppler] [PATCH] script names for vertical writing mode should be differentiated for CJK

mpsuzuki at hiroshima-u.ac.jp mpsuzuki at hiroshima-u.ac.jp
Mon Mar 26 08:32:30 PDT 2012


Oops, I ought to have asked this question when the patch
was applied on 2007; I was impressed as something strange.
Anyway, I was reassured that I could find it before some
complaints from Chinese or Korean users.

Here is a small patch to fix it. At least, changing from
"kana" to "hani" is very useful for SimSun and MingLiU on
Win32 platform.

Also I fixed Korean entry by changing "kana" to "hang",
but Batang (bundled to Microsoft Windows) have other
problems, and I will submit another set of patches.

Regards,
mpsuzuki

On Mon, 26 Mar 2012 19:10:16 +0900 (JST)
Koji Otani <sho at bbr.jp> wrote:

>Because I had not enough knowledge about Chinese and Korean fonts, I
>think.
>I'll appreciate it if you would fix them.	
>----------
>Koji Otani
>
>From: suzuki toshiya <mpsuzuki at hiroshima-u.ac.jp>
>Subject: Why TrueType vertical glyphs for Adobe-CNS1, -GB1, -Korea1 use "kana" script tag?
>Date: Mon, 26 Mar 2012 18:03:58 +0900
>Message-ID: <4F7030FE.8040005 at hiroshima-u.ac.jp>
>
>mpsuzuki> Dear Otani-san,
>mpsuzuki> 
>mpsuzuki> During the testing for GlobalParamsWin.cc improvement with MinGW,
>mpsuzuki> I found that the vertical glyphs for Adobe-CNS1, -GB1, -Korea1
>mpsuzuki> with external (non-embedded) TrueType fonts do not work well with
>mpsuzuki> Chinese/Korean TrueType fonts bundled to Microsoft Windows; SimSun,
>mpsuzuki> MingLiU and Batang.
>mpsuzuki> 
>mpsuzuki> The reason is very clear; FoFiTrueType::setupGSUB() prepares the
>mpsuzuki> vert or vrt2 GSUB features for default language system and specified
>mpsuzuki> script. In current poppler, "kana" script tag is used in all cases
>mpsuzuki> of Adobe-CNS1, -GB1, -Korea1. But SimSun, MingLiU, and Batang fonts
>mpsuzuki> have no layout features for "kana" script tag (furthermore, these
>mpsuzuki> fonts do not know anything about "kana" script).
>mpsuzuki> The reason why "kana" is used always is because of your patch applied
>mpsuzuki> on 2007:
>mpsuzuki> 
>mpsuzuki> commit 14a8361039d708661b8699b2e7c4496135021a85
>mpsuzuki> Author: Albert Astals Cid <aacid at kde.org>
>mpsuzuki> Date:   Fri Jul 13 22:18:05 2007 +0000
>mpsuzuki> 
>mpsuzuki>             * fofi/FoFiTrueType.cc
>mpsuzuki>             * fofi/FoFiTrueType.h
>mpsuzuki>             * poppler/CairoFontEngine.cc
>mpsuzuki>             * poppler/CharCodeToUnicode.cc
>mpsuzuki>             * poppler/CharCodeToUnicode.h
>mpsuzuki>             * poppler/GfxFont.cc
>mpsuzuki>             * poppler/GfxFont.h
>mpsuzuki>             * poppler/SplashOutputDev.cc: Patch by
>mpsuzuki>             Koji Otani <sho at bbr.jp> to fix several problems with Japanese fonts.
>mpsuzuki>             Fixes bug 11413
>mpsuzuki> 
>mpsuzuki> Could you explain the background why you used "kana" for all cases?
>mpsuzuki> Or, you can list the fonts that you used for testing your patch in 2007.
>mpsuzuki> 
>mpsuzuki> I think using "hani" for Chinese, "hang" for Korean is safer, but
>mpsuzuki> if there are many Chinese/Korean fonts using "kana" script tag (and
>mpsuzuki> not using "hani" or "hang" tags for vertical shaping), more enhancement
>mpsuzuki> for vertical glyphs is needed. I will work for it.
>mpsuzuki> 
>mpsuzuki> Regards,
>mpsuzuki> mpsuzuki
>mpsuzuki> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixOTScriptTagForVert_20120326.diff
Type: text/x-diff
Size: 697 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120327/24c20e14/attachment.diff>


More information about the poppler mailing list