[poppler] Vertical or horizontal writing?
mpsuzuki at hiroshima-u.ac.jp
mpsuzuki at hiroshima-u.ac.jp
Mon Jul 26 00:24:40 PDT 2010
Hi,
Yet I'm not sure how you use poppler in your application,
but GfxFont class has a method to obtain "writing mode"
in PDF terminology. Please see GfxFont.h, you can find:
/* this is default */
106 class GfxFont {
107 public:
108
...
206 // Return the writing mode (0=horizontal, 1=vertical).
207 virtual int getWMode() { return 0; }
/* this is for CID-keyed font */
321 class GfxCIDFont: public GfxFont {
322 public:
...
333 // Return the writing mode (0=horizontal, 1=vertical).
334 virtual int getWMode();
And, you can find how poppler identify the writing mode
in GfxFont.cc:
1763 int GfxCIDFont::getWMode() {
1764 return cMap ? cMap->getWMode() : 0;
1765 }
Is this what you want?
Regards,
mpsuzuki
On Mon, 26 Jul 2010 14:49:38 +0800 (CST)
"cobra.yu" <cobra.yu at hyweb.com.tw> wrote:
>Hi,
>
> Is there any way by poppler to acquire the correct writing mode for any Document/Page/Paragraph? I'm writing some code for the vertical Chinese writing mode text search, but finding that it seems no way to know the exact mode by poppler.
> Any suggestions are welcome! Thx.
>
> Cobra
>_______________________________________________
>poppler mailing list
>poppler at lists.freedesktop.org
>http://lists.freedesktop.org/mailman/listinfo/poppler
More information about the poppler
mailing list