Hi, ----- original Nachricht -------- Gesendet: Mi, 16. Sep 2009 Von: Tony Scerri<[email protected]>
> Hi > > I had a bunch of PDFs which used Adobe CFF/Type2 fonts which arent > supported > in PDFbox. I was wondering what the current plan/view on this topic is with > respect for adding support. Is this something that will come out of FontBox > or some other library? AFAIK there is no plan for pdfbox, but I think our goal is to support as much pdf-features as possible/needed. > Anyway I went of on one of those coding rambles for the hell of it and went > down the path of seeing what it would take to make them render using PDFBox > through AWT. Annoyingly Java uses a library beneath the scene which would > appear to support CFF/Typ2 but just wasnt exposed through the java APIs for > some reason, maybe licenseing who knows. So with AWT the only way is to > either write some glyph rendering code which there didnt seem to be an API > for dropping new glyph renderers in, you'd simply have to go over in via > AWT > drawing API, or the route I pursued was to convert CFF/Type2 to Type1 > fonts. > > > So i ended up writting a few classes which now does this on the fly > changing > the embeded fonts byte stream from one to the other. Its not supporting all > features (mainly hinting and flex) available in the font types, but the > core > necessary to draw each glyph in some fasion appears to be functioning. > > I was wondering if this is something for the PDFBox project itself or > FontBox maybe. Or is there an existing way to do this already which just > needs incorporating into PDFBox. I'm happy to contribute the code (after > some cleanup) and maybe some discussion on the best approach. Right now it > fits into the PDType1Font class when it detects the filestream for CFF font > it passses it over to my class which converts it and embeds it back into > tthe PDF font stream so the remainder of the code picks it up as a Type1 > font. That would be great!! I think it should be rather included in fontbox than in pdfbox itself, but we'll see. Please file an issue on JIRA as a start and attach your code to it. If no one else volunteers, I'll assist you including the code. Depending on your code we have to decide if you have to sign an ICLA before we are able to accept your changes. See [1] for more details about committership and ICLA. For now thanks for your offer and I'm looking forward to help you to integrate your solution. BR Andreas Lehmkühler [1] http://markmail.org/message/bb46ul7c4ta4olcr
