[ https://issues.apache.org/jira/browse/PDFBOX-3459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15415598#comment-15415598 ]
Tilman Hausherr commented on PDFBOX-3459: ----------------------------------------- No regressions. However: {code} // cache glyph path if is not already cached GeneralPath path = cache.getPathForCharacterCode(code); if (path == null) { path = vectorFont.getNormalizedPath(code); cache.put(code, path); } {code} {{cache.getPathForCharacterCode}} calls {{font.getNormalizedPath(code)}} so it is called twice?! It's also a bit unusual to me that the cache class has font logic in itself, i.e. it does more than just caching. And why not keep the caching to the font, so that everyone who gets glyphs can profit from caching? I'm also wondered if changes should be done in DrawPrintTextLocations example. > Move Glyph2D functionality into PDFont subclasses > ------------------------------------------------- > > Key: PDFBOX-3459 > URL: https://issues.apache.org/jira/browse/PDFBOX-3459 > Project: PDFBox > Issue Type: Improvement > Components: PDModel, Rendering > Affects Versions: 2.1.0 > Reporter: John Hewson > Assignee: John Hewson > > The Glyph2D classes perform some extra normalisation and substitution of > glyph paths so that they are ready for final rendering. It would be better > for this functionality to be part of the various PDFont subclasses so that > it's easy to get access to the final glyph bounds. We've had [user requests > for > this|http://pdfbox-dev.markmail.org/search/?q=glyph2d#query:glyph2d+page:1+mid:ww4vslm4xnztxvol+state:results]. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org