Fedora 35 vertical text test cases failing (render_test-glyph-y-pos, render_text-glyphs-combining, render_text-glyphs-vertical, render_test-rtl-vertical)

Reported by @shlomif in #2917

Steps to reproduce:

        ninja -j4 install && \
        ninja -j4 check \
        ; n --msg "Inkscape build finished"

What happened?

  • Some test failures, all revolving around vertical text that is oriented like LTR text.

image

fedora_35_tests.zip

        Start 352: render_text-gzipped-svg-glyph
352/352 Test #352: render_text-gzipped-svg-glyph .......................................   Passed    0.46 sec

99% tests passed, 4 tests failed out of 352

Total Test time (real) = 107.97 sec

The following tests did not run:
         57 - cli_export-type_emf_check_output (Skipped)
         71 - cli_export-area-page_emf_check_output (Skipped)
        219 - cli_export-ignore-filters_emf_check_output (Skipped)
        253 - cli_export-extension_emf_check_output (Skipped)

The following tests FAILED:
        347 - render_test-glyph-y-pos (Failed)
        348 - render_text-glyphs-combining (Failed)
        349 - render_text-glyphs-vertical (Failed)
        351 - render_test-rtl-vertical (Failed)
Errors while running CTest
ninja: build stopped: subcommand failed.
shlomif[ink]:$trunk$

Bisection of pango indicates that the Fedora 35 rendering issues were introduced in https://gitlab.gnome.org/GNOME/pango/-/commit/ccb651dd2a876a4f4a4cb9351f05332173e709ba, https://gitlab.gnome.org/GNOME/pango/-/merge_requests/495

commit ccb651dd2a876a4f4a4cb9351f05332173e709ba (origin/advance-transform)
Author: Matthias Clasen <mclasen@redhat.com>
Date:   Fri Nov 5 06:57:44 2021 -0400

    Fix advance widths with transforms
    
    The hb_font_t we were passing to Harfbuzz
    for shaping was not taking context transforms
    into account, and therefore was not scaling
    advance widths as necessary. Always go through
    pangos glyph extents to fix this.
    
    Fixes: https://gitlab.gnome.org/GNOME/pango/-/issues/620

This change can also be seen in pango-view, though I can only figure it out for chinese text, of which, I'm not sure which rendering is more correct.

pango-view --gravity=west --font="Noto Sans CJK JP" --rotate=90 --text="㆕㆖㆘" gives the left rendering image

pango-view --gravity=west --rotate=90 utils/test-chinese.txt (taken from https://gitlab.gnome.org/GNOME/pango/-/issues/423#note_608895, utils/test-chinese.txt referring to https://gitlab.gnome.org/GNOME/pango/-/blob/main/utils/test-chinese.txt) gives the left rendering

image

What should have happened?

  • Tests pass

Inkscape Version and Operating System:

  • Inkscape Version: 1.2-dev on Fedora 34. I don't have precise version info at hand, but let's say 1.2-dev (9a8a3d57, 2021-11-25)