[poppler] Vertical or horizontal writing?

mpsuzuki at hiroshima-u.ac.jp mpsuzuki at hiroshima-u.ac.jp
Tue Jul 27 05:35:43 PDT 2010


Dear Albert,

On Tue, 27 Jul 2010 10:32:45 +0900
mpsuzuki at hiroshima-u.ac.jp wrote:
>>But i'd prefer you to use an enum instead of an int, at least on the poppler-
>>qt4 level, can you do the appropiate changes?
>
>OK, I will improve, of course. But please let me ask
>your comment about the appropriate design.
>
>When CMap->parse() parses CMap resource, it can load any
>integer value to CMap->wMode. And, The type of the return
>value from CMap->getWMode() (and GfxFont->getWMode()) is
>int.
>
>In FontInfo class, should I restrict the writing mode
>enumeration value to 2 correct values: 0/horizontal or
>1/vertical?
>
>Or, it is better to have 3 values: 0/horizontal, 1/vertical
>and -1 (or 2, or anything else) for broken writing mode
>info?

Just I've drafted a patch using enum type in Poppler::FontInfo::wMode
and its copy in Qt4/GLib/cpp binding. Please find attached
patch.

--

But, Cobra had found the font-level writing mode detection
is insufficient even we restrict the scope to the PDF
generated by popular applications. I attached a PDF
including vertical text which is generated by MS Office
2010 PDF generator addin. The embedded font is connected
with Identity-H, so my patch recognizes the font is for
horizontal. I try to detect the expected result by using
text level information. So, please don't hurry to evaluate
this patch. I mush work more.


Regards,
mpsuzuki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fontinfo-wmode_20100727a.diff
Type: text/x-diff
Size: 10631 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100727/a7081545/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msword2010-vert2.pdf
Type: application/pdf
Size: 35919 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100727/a7081545/attachment-0001.pdf>


More information about the poppler mailing list