You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2014/11/27 19:32:12 UTC

[jira] [Comment Edited] (PDFBOX-2524) Two PDFont to create PDF documents in CJK and non-ISO-8859-1 languages

    [ https://issues.apache.org/jira/browse/PDFBOX-2524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14227884#comment-14227884 ] 

John Hewson edited comment on PDFBOX-2524 at 11/27/14 6:31 PM:
---------------------------------------------------------------

Hi Keiji, thanks for making this patch, a lot of work has clearly gone into it. In the future I'd encourage you to discuss large patches on the dev mailing list before you start work on the code, as we can offer you feedback and explain some of the architectural designs which we've made in 2.0. With such a big patch, we really need to break it down into smaller pieces which we can review and integrate it into PDFBox one feature at a time.

What we need is to start with is a minimal patch only for embedding TTF fonts with Unicode characters as Type0/CIDType2 fonts. Then we should do another patch for the TTF subsetting. Then another patch for built-in access to CJK fonts from Adobe Reader. Each patch will need to be reviewed and go through a few iterations of feedback.


was (Author: jahewson):
Hi Keiji, thanks for making this patch, a lot of work has clearly gone into it. In the future I'd encourage you to discuss large patches on the dev mailing list before you start work on the code, as we can offer you feedback and explain some of the architectural designs which we've made in 2.0. With such a big patch, we really need to break it down into smaller pieces which we can review and integrate it into PDFBox one feature at a time.

What we need is to start with is a minimal patch only for embedding TTF fonts with Unicode characters as Type0/CIDType2 fonts. Then we should do another patch for the TTF subsetting. Then another patch for which provides built-in access to CJK fonts from Adobe Reader. Each patch will need to be reviewed and go through a few iterations of feedback.

> Two PDFont to create PDF documents in CJK and non-ISO-8859-1 languages
> ----------------------------------------------------------------------
>
>                 Key: PDFBOX-2524
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2524
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Writing
>    Affects Versions: 2.0.0
>            Reporter: Keiji Suzuki
>            Assignee: John Hewson
>         Attachments: Type0CJK.java, Type0Unicode.java, two-new-fonts.diff
>
>
> I made two PDFont classes for creating PDF documents in CJK and non-ISO-8859-1 languages.
> One is PDType0CJKFont. This is for using CJK fonts included in the Asian font package of Adobe Reader. This font doesn't require the target font at the time of creating PDF documentary. This font uses UTF-16 as a text code and supports surrogate pair characters.
> The other is PDType0UnicodeFont. This is for using TrueType Type0 Font which can deal with any Unicode characters like a ArialUnicodeMS. Only the characters which are used actually in the document are embedde. Realizing this, you have to call the PDType0Unicode.reloadFont() method just before closing PDPageContentStream. I think this specification is ugly, but I could not thought of a suitable way to remove this spec. This font uses the original glyph code of the embedded font as a text code and supports surrogate pair characters too.
> Example programs using these two fonts are also attached.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)