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 2016/04/07 20:01:25 UTC

[jira] [Commented] (PDFBOX-3293) Font glyphs with overlapping paths not rendered correctly

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

John Hewson commented on PDFBOX-3293:
-------------------------------------

This is a very interesting font. Looking at Tilman's reduced example, with only the glyph for U+53EF, we see only a partial rendering of the glyph in PDFBox. Looking at the {{glyf}} table with [OTMaster|http://fontmaster.nl], we see that it's actually a composite glyph made up of five smaller glyphs:

!glyf.png!

So, lets take a look at how that glyph renders with OTMaster:

!hinted.png!

Looks good, that's the correct rendering. But now lets turn off hinting:

!unhinted.png!

Aha! That's the same rendering as PDFBox. So the problem is hinting. This font contains glyphs which don't render correctly unless hinting is turned on, and those TrueType hinting instructions you can see in the screenshot get executed. This is a bad font. Hinting should never be necessary to get the correct vector outline - remember, hinting is a fundamentally bitmap-oriented operation.

We should probably close this as a won't-fix.

> Font glyphs with overlapping paths not rendered correctly
> ---------------------------------------------------------
>
>                 Key: PDFBOX-3293
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3293
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox, Rendering
>    Affects Versions: 2.0.0
>            Reporter: Pei-Tang Huang
>            Priority: Critical
>         Attachments: PDFBOX-3293.ttf, PDFBOX-3293_reduced.pdf, fontforge.png, glyf.png, hinted.png, sample.pdf, sample_rendered.tif, unhinted.png
>
>
> Font glyphs with overlapping paths may be rendered in correctly, especially when the font size is small.
> Sadly, the Traditional Chinese edition of Windows bundled fonts 細明體&新細明體 (MingLiU & PMingLiU) and 標楷體 (DFKai-SB) all suffer from this problem.
> See attached sample.pdf and the rendered sample_rendered.tif.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org