Hello,

In what seems like a never ending list of tasks for the PoDoFo 1.0 release,
I recently checked-in[1] a rewritten support for querying the "Adobe Glyph
List"[2][3], both for text extraction and glyph selection. While text
extraction regards fetching the semantic Unicode text, glyph selection is
more related to rendering and involves determining the correct index of the
glyph to render in the font program. In the so called "simple" fonts
(/Type1, /TrueType and /Type3 fonts), this can be not simple at all, and in
the case of TrueType fonts the difficulty to write an implementation with
the current abstractions in PoDoFo can be "legendary", due to the
specification not really providing smart general rules, but basically
dictating the internal behavior of Acrobat products, which probably
stratified features and compatibility hacks in a incoerent way before the
introduction of CID fonts.

It is interesting to observe that the handling of "Adobe Glyph List" in
PoDoFo was quite...wrong: the AGL resources in the 0.9.x code[4] are not
really the lists supplied by Adobe, and the correct way ligatures are
handled in the specification is very different. Only Dominik knows at this
point: maybe he copied a wrong implementation from some other project, but
either way the specification was probably bypassed and a hacky
implementation that seemed to work emerged. I can't really blame anyone for
this: it's really work that requires full commitment for days/weeks.

Concluding, as said glyph selection is related to rendering but this does
not mean that I'm currently using PoDoFo for rendering, as I need the
feature in another PDF processing task as part of my duties. Sadly this
means that the unit tests and the fixture are not public, similarly to
everything related to text extraction, but the message here is that having
such features is a demonstration of the maturity of PoDoFo, which could
already be used to render basic content (text and several images) quite
trivially.

As I should be done with PoDoFo features for now, I will resume
preparations for the 1.0 release with remaining (trivial) tasks and bug
fixing. Stay tuned.

Francesco

[1]
https://github.com/podofo/podofo/commit/e6e22157e3ffe8bbe18541f485009545bd415c48
[2] https://github.com/adobe-type-tools/agl-aglfn/
[3] https://github.com/adobe-type-tools/agl-specification
[4]
https://github.com/podofo/podofo/blob/0.9.x/src/podofo/doc/PdfDifferenceEncoding.cpp
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to