Hi, On Tue, 27 Mar 2012 00:32:30 +0900 [email protected] wrote: >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.
The problems in Batang (a Korean font bundled to Microsoft Windows) are following. 1) entries in OpenType lookup table are sorted by source GID? FoFiTrueType assumes the entries in lookup table are sorted by source GID. If it finds a GID greater than source GID, the lookup process is finished as "not found in the table". In Batang, the entries in the lookup subtable for "vert" feature is not sorted by source GID, so some substitution rule could not be found. So all entries should be scanned to use Batang. attached "fixOTLookupForUnsortedTable_20120326.diff" is a workaround patch for this issue. 2) default language system or not? FoFiTrueType assumes the vertical layout feature is defined in default language system, for specified script. FoFiTrueType::setupGSUB() takes only script name. It is true for SimSun, MingLiU, MS-Mincho, but false for Batang. In Batang, "hang" script supports "KOR " language system (in "KOR " language system, "vert" is defined), but default language system is not "KOR " and it has no layout feature. attached "addSetupGSUBWithLang_20120326.diff" is a patch to add new variant of FoFiTrueType::setupGSUB() taking both of "script" and "language". By giving both of "hang" and "KOR ", the vertical layout feature of Batang can be activated. Original method is kept as a thin wrapper of new method. attached "useSetupGSUBWithLang_20120326.diff" is a patch to modify GfxCIDFont::getCodeToGIDMap() to use new variant of FoFiTrueType::setupGSUB(script, lang). -- If more detailed analysis and testing PDF are required, I will post. Regards, mpsuzuki _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
