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/12/16 20:19:14 UTC

[jira] [Comment Edited] (PDFBOX-2560) Arial Truetype CID font rendering incorrect

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

John Hewson edited comment on PDFBOX-2560 at 12/16/14 7:18 PM:
---------------------------------------------------------------

I think I've finally solved the mystery of non-symbolic Type0 fonts, i.e. TTFs in CIDFontType2. The symbolic/nonsymbolic flags _are not used_ when handling these fonts. The PDF spec mentions nothing regarding those flags for CIDFonts, and that fact that the nonsymbolic flag has been set appears to be a red herring.

The two test files which we have are PDFBOX-1422 and the PDF from this issues. Both of these files can be rendered by looking up the character code in the ToUnicode CMap. There was an error in the existing code where I had been trying to use the ToUnicode CMAP to look up a CID, but I should have been looking up the character code, as per ISO 32000:

{quote}
It shall use the beginbfchar, endbfchar, beginbfrange, and endbfrange operators to define the mapping from _character codes_ to Unicode character sequences expressed in UTF-16BE encoding.
{quote}


was (Author: jahewson):
I think I've finally solved the mystery of non-symbolic Type0 fonts, i.e. TTFs in CIDFontType2. The symbolic/nonsymbolic flags _are not used_ when handling these fonts. The PDF spec mentions nothing regarding those flags for CIDFonts, and that fact that the nonsymbolic flag has been set appears to be a red herring.

The two test files which we have are PDFBOX-1422 and the PDF from this issues. Both of these files can be rendered by looking up the character code in the ToUnicode CMap. There was an error in the existing code where I had been trying to use the ToUnicode CMAP to look up a CID, but I should have been looking up the character code, as per ISO 32000:

{quote}
It shall use the beginbfchar, endbfchar, beginbfrange, and endbfrange operators to define the mapping
from character codes to Unicode character sequences expressed in UTF-16BE encoding.
{quote}

> Arial Truetype CID font rendering incorrect
> -------------------------------------------
>
>                 Key: PDFBOX-2560
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2560
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox
>    Affects Versions: 2.0.0
>            Reporter: Tilman Hausherr
>            Assignee: John Hewson
>         Attachments: PDFBOX-2560.pdf, PDFBOX-25601.jpg
>
>
> The rendering of the attached file shows entirely wrong glyphs.



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