[poppler] Vertical or horizontal writing?

Albert Astals Cid aacid at kde.org
Tue Jul 27 12:41:52 PDT 2010


A Dimarts, 27 de juliol de 2010, mpsuzuki at hiroshima-u.ac.jp va escriure:
> 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?

Well, reading the specification it says that 0 is the default so i understand 
that if there is a value different than 0 or 1, 0 should be used.

Albert

> 
> 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


More information about the poppler mailing list