Thanks for the explanation, John.

So ... I could accomplish the same thing calling getPath and applying the
transformation?
https://github.com/apache/pdfbox/blob/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDTrueTypeFont.java#L442

I think you solved it for me.

On Wed, May 18, 2016 at 12:29 PM, John Hewson <[email protected]> wrote:

>
> > On 17 May 2016, at 09:39, Daniel Wilson <[email protected]>
> wrote:
> >
> > My application needs to find the coordinates of the artwork within the
> > Adobe Illustrator (PDF) document.  For most graphic instructions (lineTo,
> > curveTo, appendRectangle, etc.) this is very easy.
> >
> > But I need to create a chunk of code like the one at
> >
> https://github.com/apache/pdfbox/blob/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java#L350
> >
> > (I know, that's not the official repo, but it's very handy for
> reference.)
> >
> > In order to create that chunk of code, I need a variable of type Glyph2D.
> > Glyph2D and the classes that implement it are private.
> >
> >
> https://github.com/apache/pdfbox/blob/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/Glyph2D.java
> >
> https://github.com/apache/pdfbox/blob/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/TTFGlyph2D.java#L39
> >
> > Is there any reason NOT to make that interface and those classes public?
>
> Yes, these are just implementation details of our rendering component. At
> this point they’re mostly artefacts of the previous design and really needs
> to be moved to PDFont, where it can be public.
>
> The various subclasses of PDFont have a getPath(…) method which can be
> called to get a GeneralPath from a glyph name / CID. Much as I’d like to
> suggest something better, you can copy/paste the code from Glyph2D to get
> the mapping.
>
> — John
>
> > Thanks!
> >
> > Daniel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to