After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787526 - Mark glyphs are incorrectly positioned in vertical text
Mark glyphs are incorrectly positioned in vertical text
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.40.x
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2017-09-10 21:03 UTC by Khaled Hosny
Modified: 2018-05-25 09:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pango-view output (12.16 KB, image/png)
2017-09-10 21:05 UTC, Khaled Hosny
Details
hb-view output (7.16 KB, image/png)
2017-09-10 21:08 UTC, Khaled Hosny
Details
Test program showing bad geometry data. (3.37 KB, text/x-c++src)
2018-05-25 09:21 UTC, tavmjong
Details

Description Khaled Hosny 2017-09-10 21:03:39 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
Comment 1 Khaled Hosny 2017-09-10 21:05:15 UTC
Created attachment 359483 [details]
pango-view output
Comment 2 Khaled Hosny 2017-09-10 21:08:20 UTC
Created attachment 359484 [details]
hb-view output
Comment 3 Behdad Esfahbod 2017-09-18 16:45:24 UTC
Someone needs to debug itemization.
Comment 4 tavmjong 2017-09-22 13:50:48 UTC
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.
Comment 5 Behdad Esfahbod 2017-10-01 17:31:43 UTC
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.
Comment 6 tavmjong 2018-05-15 10:17:28 UTC
This seems to be fixed in latest Pango... but when and how isn't apparent.
Comment 7 Khaled Hosny 2018-05-15 16:16:24 UTC
Probably a change in HarfBuzz, I tried building tags as old as 1.40.0 and can’t reproduce the issue anymore.
Comment 8 tavmjong 2018-05-25 09:21:25 UTC
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
Comment 9 tavmjong 2018-05-25 09:26:15 UTC
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.