Cairo PS/PDF output is using hinted metrics
I noticed that the letter spacing is incorrect in cairo PDF and PS output. The problem can easily be seen in this line from the PS output (cairo uses PDF operators in PS output):
The numbers are kerning adjustments. As Pango does not kern Type 1 fonts, using the default Nimbus Roman No9 L font, if the glyphs were at their natural glyph advances the line would be:
The problem is in pango_textlayout() where it is setting the font options. Instead of specifying the font options, you should call pango_cairo_update_context() with the cairo content. Pango will pickup the default font options for the surface which for PDF/PS is hint style and metrics off. Also, setting the subpixel order manually is wrong. If pango_cairo_update_context() is used it will detect the subpixel order for the display used.
I tried to create a patch for this but it appears the layout is done first before the surface is created.