PDF glyph_path() inaccuracies
Submitted by Ian Britten
Assigned to Adrian Johnson @ajohnson
Description
Created attachment 36336 Sample C program that reproduces the glyph_path() PDF problem
There appears to be some inaccuracies from cairo_glyph_path(), when written to PDF. Note the problem may only be noticeable when the text is tiny/small (which is the case I encountered).
Use cairo_glyph_path() to convert a glyph to a path, then stroke() it with a thick lineweight. Then, do a show_glyphs() directly after (Different colour, but same position/size/etc). In the resulting PDF, the 'halo' outline isn't evenly aligned around the text, as would be expected. However, rendering the same data to an image surface produces the expected output.
Attached is a stand-alone test program that demonstrates the problem. The single glyph is rendered at the centre of the output files. [ WARNING - It produces a huge PNG for comparison, in addition to the PDF. Disable the PNG if desired ]
This has already been investigated some by Chris Wilson (ickle) on IRC. He has triaged the problem some, and says: "... mention that I think it is due to the Tm matrix". He also suggested CC'ing Adrian
Attachment 36336, "Sample C program that reproduces the glyph_path() PDF problem":
halo_test.c
Version: 1.8.6