[ https://issues.apache.org/jira/browse/PDFBOX-3081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14985931#comment-14985931 ]
John Hewson edited comment on PDFBOX-3081 at 11/2/15 8:10 PM: -------------------------------------------------------------- text.getXDirAdj(), text.getYDirAdj(), and text.getWidthDirAdj() don't return correct values, so your blue boxes were incorrect. So I added some code which bypasses TextPosition when performing these calculations. I've also structured my calculations in terms of the space transforms, because "text.getYScale()" can't work as it assumes that text space is rectangular when projected into user space, but that's not true as the text matrix can be arbitrary. All space transforms need to be done with matrixes - scaling factors can't work in the general case. I also added some extra code to handle Type 3 fonts. was (Author: jahewson): text.getXDirAdj(), text.getYDirAdj(), and text.getWidthDirAdj() don't return correct values, so your blue boxes were incorrect. So I added some code which bypasses TextPosition when performing these calculations. I've also structured my calculations in terms of the space transforms, because "text.getYScale()" can't work as it assumes that text space is rectangular when projected into user space, but that's not true as the text matrix can be arbitrary. All space transforms need to be done with matrixes - scaling factors can't work. > Create example to draw glyph sizes in rendered images > ----------------------------------------------------- > > Key: PDFBOX-3081 > URL: https://issues.apache.org/jira/browse/PDFBOX-3081 > Project: PDFBox > Issue Type: Bug > Components: Utilities > Affects Versions: 2.0.0 > Reporter: Tilman Hausherr > Assignee: Tilman Hausherr > Fix For: 2.0.0 > > > DrawPrintTextLocations is PrintTextLocations on steroids: after rendering an > image, the bounds of the font sizes are drawn on it and the images are saved. > This will allow to see whether a value shown by PrintTextLocations makes > sense or not. The output as in PrintTextLocations will be kept. The classic > PrintTextLocations will also be kept so that people don't write support > questions. -- 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