[poppler] Single script name can be insufficient to cover all vertical glyphs (Re: script names for vertical writing mode)
suzuki toshiya
mpsuzuki at hiroshima-u.ac.jp
Mon Mar 26 10:13:09 PDT 2012
Also it would not be before 0.20, I'm thinking about
further extension of vertical glyph support.
Yet I don't have a sample font in TrueType format,
OpenType spec
http://www.microsoft.com/typography/otspec/chapter2.htm
shows a possibility that a Japanese font has 3 scripts;
hani, kana, latn (see Example 1). By seeing script names
only, it is difficult to know which script covers the
punctuations. As a result, to exploit the vertical glyphs
as many as possible, passing multiple script names to
FoFiTrueType::setupGSUB() should be considered. I think
there is no specification to determine which codepoints
should be handled by which scripts.
If multiple GSUB feature tables are found, they should
be combined. At present, FoFiTrueType's GSUB supporting
code is difficult to do such. It parses GSUB feature table
image for each query of vertical glyph GID. To combine
multiple GSUB feature tables, FoFiTrueType should hold
some mapping table. Of course, I will draft such code,
but I'm not sure about the impact to the memory footprint.
Regards,
mpsuzuki
mpsuzuki at hiroshima-u.ac.jp wrote:
> 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>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> poppler mailing list
>> poppler at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/poppler
More information about the poppler
mailing list