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.
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).
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.
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.
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.
I meant "we prefer the first".
Created attachment 2046 [details] patch.txt Saving a copy of a patch I'm working on. It's not ready yet.
Patch to HEAD : http://ghostscript.com/pipermail/gs-cvs/2006-February/006358.html It fixes this bug and several other problems in the hinter.
One more patch : http://ghostscript.com/pipermail/gs-cvs/2006-February/006378.html