GNOME Bugzilla – Bug 787526
Mark glyphs are incorrectly positioned in vertical text
Last modified: 2018-05-25 09:26:15 UTC
With: pango-view --font="DejaVu Sans 100" --text="G̃g̃X̃x̃" --gravity=east --gravity-hint=strong --rotate=-90 The mark glyph positions are off, while they are correct with: hb-view DejaVuSans.ttf "G̃g̃X̃x̃" --direction=t
Created attachment 359483 [details] pango-view output
Created attachment 359484 [details] hb-view output
Someone needs to debug itemization.
Looking at the output from Pango that Inkscape uses, it appears that the horizontal advance is entering into the calculation of x_offset rather than the vertical advance.
Ugh. It's all those 'XXX's in pangofc-shape.c going wrong... I spent a good twenty minutes on it, couldn't figure out. Will try more.
This seems to be fixed in latest Pango... but when and how isn't apparent.
Probably a change in HarfBuzz, I tried building tags as old as 1.40.0 and can’t reproduce the issue anymore.
Created attachment 372394 [details] Test program showing bad geometry data. Compile with: g++ -g -o context `pkg-config --cflags --libs cairo pango pangocairo gtkmm-3.0 freetype2 pangoft2` -lm context.cc
The underlying problem seen by Inkscape for vertical upright Latin text has not been fixed. If one gets a PangoContext via Cairo, the glyph geometry data is as expected, via FreeType it is not. In particular the 'width' in the Freetype branch is equal to the horizontal advance and not the vertical advance as expected. The x_offset is also incorrect.