All text inaccurately imported using the new differential kerning internal PDF importer

Steps to reproduce:

The new differentially-kerned PDF importer does not accurately respect the original position of imported text. This is a very noticeable problem with text that was originally justified, but actually applies to all text.

  1. Import Lorem.pdf using the internal importer, resulting in Lorem.svg.
  2. Notice that the right edge of each text block does not agree with the edge in the original block.

What should have happened?

In v1.3.2, which used absolute kerning, the right edge aligns properly as shown here: Lorem_1.3.2.svg.

Note that this is not the same as 5326, which applies to certain text separated by a large space. This appears to be a result of a miscalculation of the width of each individual character. Even the 'o' in 'Lorem ipsum' is inaccurately placed (its left x coordinate is 104.887 px, not the correct value of 104.960 px), so it seems to affect every character but the first character in each line. (It does not seem to be related to relative kerning, as 'L' and 'o' have no relative kerning in Times New Roman.)

I made Comparison.svg to illustrate the issue by removing transforms and superimposing the two imports.

Inkscape Version and Operating System:

Inkscape 1.4 (86a8ad79, 2024-10-11)

                  Compile  (Run)
GLib version:     2.82.1
GTK version:      3.24.43 (3.24.43)
glibmm version:   2.66.7
gtkmm version:    3.24.9
libxml2 version:  2.12.9
libxslt version:  1.1.42
Cairo version:    1.18.2 (1.18.2)
Pango version:    1.54.0 (1.54.0)
HarfBuzz version: 10.0.1 (10.0.1)

OS version:       Windows 11 23H2.
Edited by David Burghoff