Bug 688552 - A poor grid fitting when a flex hint is missing.
Summary: A poor grid fitting when a flex hint is missing.
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: PC Windows XP
: P4 normal
Assignee: leonardo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-10 11:09 UTC by leonardo
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
d.bmp.zip (12.51 KB, application/octet-stream)
2006-02-10 11:13 UTC, leonardo
Details
86554321-.pdf (930.17 KB, application/pdf)
2006-02-10 11:16 UTC, leonardo
Details
patch.txt (19.42 KB, patch)
2006-02-16 12:00 UTC, leonardo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description leonardo 2006-02-10 11:09:45 UTC
When a glyph outline includes a local extremum with a very low curvity, and the 
curvity sign is opposite to the sign of the nearest global extremum, the grid 
fitting appears bad unless a flex hint is specified. 

This problem happens while rendering 86554321.pdf with patch6 attached to the 
bug 687654. It happens because trhe hinter determines the outer stem boundary 
by the curvity sign.
Comment 1 leonardo 2006-02-10 11:13:45 UTC
Created attachment 2027 [details]
d.bmp.zip

A visual trace diagram that illustrates the problem. See the ununiform stem
width near the glyph top (blue line is the source glyph, the green line is the
grid-fitted glyph).
Comment 2 leonardo 2006-02-10 11:16:36 UTC
Created attachment 2028 [details]
86554321-.pdf

A simplified test case. We re-distilled 86554321.pdf with Ghostscript to drop
the password protection, then removed unrelated objects with Acrobat 5.
Comment 3 leonardo 2006-02-10 11:23:17 UTC
In the test case the problem happens due to a poor hinting of the font Palatino-
Roman, which is substituted with URWPalladioL-Roma, which is distributed with 
Ghostscript in p052003l.pfb . In the attached test case it is an embedded 
subset, but while a regular rendering of 86554321.pdf it's a resident font.
Comment 4 leonardo 2006-02-10 11:29:23 UTC
Rather it would be useful to fix the URW font, we believe that we should 
improve the Type 1 hinter against such effects, because the problem may happen 
with a TrueType font, because our topological grid fitting doesn't recognize 
flex. Need to decide wheather the flex recognition to be a part of Type 1 
hinter against poor fonts, or it must be a part of the topological grid fitting 
(in this case we won't waste processor time for verifying good Type 1,2 
glyphs). For now we prefer the forst for better rendering quality in general.
Comment 5 leonardo 2006-02-10 11:31:08 UTC
I meant "we prefer the first".
Comment 6 leonardo 2006-02-16 12:00:42 UTC
Created attachment 2046 [details]
patch.txt

Saving a copy of a patch I'm working on. It's not ready yet.
Comment 7 leonardo 2006-02-21 04:53:26 UTC
Patch to HEAD :
http://ghostscript.com/pipermail/gs-cvs/2006-February/006358.html
It fixes this bug and several other problems in the hinter.
Comment 8 leonardo 2006-02-24 08:19:02 UTC
One more patch :
http://ghostscript.com/pipermail/gs-cvs/2006-February/006378.html