[
https://issues.apache.org/jira/browse/PDFBOX-2210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14063320#comment-14063320
]
Petr Slaby commented on PDFBOX-2210:
------------------------------------
We have a similar problem. In our application, we produce (among others) PCL
and AFP output. For PDFBox, we have a PCL and AFP specific implementation of
Graphics2D which produces the commands in the respective printer language. In
the old solution, fillGlyphVector or drawGlyphVector was called for printing
characters using AWT fonts. From the glyph vector, we were able to get at the
AWT font and the character(s) being printed. From that, we were able to pick an
existing PCL or AFP font if an equivalent for the AWT font was configured, or
produce an on-the-fly font and embed it into the output. With the current
solution, we just get a shape and do not even know that it is coming from
rendering of text. I did not try to solve this yet, but I think I will probably
need PageDrawer.drawGlyph2D() to become part of the API (make it protected
instead of private) so that I can intercept it and call something else on our
special G2D implementation. When producing on-the-fly fonts, we need some font
metrics information - like ascend, descent and width of each character, etc.
For that, I would need to put some more information into Glyph2D, e.g. have a
reference to the underlying PDFont.
> [PATCH] Allow caching of glyphs
> -------------------------------
>
> Key: PDFBOX-2210
> URL: https://issues.apache.org/jira/browse/PDFBOX-2210
> Project: PDFBox
> Issue Type: Improvement
> Components: Rendering
> Affects Versions: 2.0.0
> Reporter: simon steiner
> Assignee: John Hewson
> Attachments: drawglyphs.patch
>
>
> If you seperate transform from glyph it means we can reuse glyphs in fop
> postscript output and get smaller output files
--
This message was sent by Atlassian JIRA
(v6.2#6252)