Bug 691777

Summary: path from "charpath" does not align with characters from "show"
Product: Ghostscript Reporter: Eric <ericw>
Component: RegressionAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: RESOLVED FIXED    
Severity: normal CC: chris.liddell
Priority: P4    
Version: 9.00   
Hardware: Macintosh   
OS: MacOS X   
Customer: Word Size: ---
Attachments: Two BMP renderings and their PS source

Description Eric 2010-11-16 23:36:49 UTC
Created attachment 6913 [details]
Two BMP renderings and their PS source

This is a regression in 9.00 relative to 8.71.

A string literal is "show"n. The same string is converted to a path using "charpath" and the resulting path stroked and filled.

In 8.71, the path is closely aligned with the characters that were generated from "show". Small errors of a pixel or two are present, which could be due to hinting differences or slight inaccuracies in the path stroking algorithm.

In 9.00, the path is closely aligned with the characters that were generated from "show" in some cases and badly misaligned in others, sometimes by the entire width of an upright stroke in the current font. In the attached PS file and BMP rendering, this effect is most obvious around the words "Security" and "funds".

The attached file is being rasterized at 600dpi using the bmpmono device.

In the attached PS file, there is a section noted "%%Ghostscript bug". This section contains a line, "%% np", that will make the bug easier to see in 9.00. Enabling the "np" line clears the current path and effectively neutralizes the fill command. This highlights the stroke and makes it easier to detect.

Notably, this bug was not present in at least one of the Release Candidates of 9.00.
Comment 1 Eric 2010-11-16 23:47:47 UTC
After a little more poking around, I noticed a commonality in the areas where the charpath doesn't line up with the shown text. In the cases of "funds" and "Security", the charpath string starts with a space character.

However, although the word "the" is also preceded by a space, it does not show the path misalignment.
Comment 2 Chris Liddell (chrisl) 2010-12-09 15:40:04 UTC
resolved in r11943.