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

John Hewson edited comment on PDFBOX-3293 at 4/7/16 6:01 PM:
-------------------------------------------------------------

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 first 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.


was (Author: jahewson):
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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to