[scribus-dev] Vertical extent of text

Michael J Gruber mjg at fedoraproject.org
Wed Nov 20 15:24:27 UTC 2019


In short, my question is: Which library
(harfbuzz/pango/cairo/freetype/fontconfig/...) does Scribus use to
determine the vertical extent of text used for colouring backgrounds?
In addition: Do I need to recompile Scribus to really try out
different library versions, or is everything relevant picked up from
the dynamically linked .so at run-time?

The reason for the question (and why I'm posting to dev) is that the
same scribus version shows quite different behaviour after an upgrade
from Fedora 30 to 31 which involved a few library upgrades, and I
would like to track down which library change this comes from and
whether the old or new behaviour is "right", or whether maybe Scribus
should use different font metric sources.

As you can see in the attached png, the differences are much bigger
than the usual variation in kerning and such. By "vertical extent" I
mean the vertical space that is used when you set a background color
via paragraph-style->properties. More details:

Versions:
"old" is Scribus-1.5.5 on Fedora 30 (with older libraries - system not
available any more), "new" is Scribus-1.5.5 or  1.5.6svn on Fedora 31
(with newer libraries - both 1.5.5 and 1.5.6svn produce the same
result).

Comparisons:
For the two layouts left and right of the black bar, "old" and "new"
are compared in split view without separation in between (PDF export
converted to PNG and split-overlayed). As you can see, "old" uses much
more vertical space than "new". [By "use" I mean for background
colouring and positioning within the box - the overall line spacing is
unchanged, see below.]

Font:
Font is Alegreya Sans
(https://github.com/huertatipografica/Alegreya-Sans). "old" and "new"
use the same ttf font files. I have tried "new" with the otf versions,
this makes no difference. (Unfortunately I can't try "old" with
different fonts - unless I know which library to downgrade.)

Properties:
White-on-green uses a paragraph style with automatic line spacing
(Alegreya Sans Bold 20), the text box uses "Font Ascent" as first line
offset. As you see, both the space above and below are smaller in
"new", and therefore the positioning changes. The same is true for the
large white-on-darkred on the right.

Small white-on-darkred and black-on-lightred  use a paragraph style
which aligns to the 12pt-base line grid, which is (even with "new")
the natural line spacing for Alegreya Sans regular 10; the text box
uses the default "Maximum Ascent" for first line offset. Here, the
same difference in vertical extent shows up, but aligned to the grid.

Side note 1: The "automatic line spacing" comes out the same in both
"old" and "new" (by looking at text with very many lines and comparing
to "manual"), so it's not the line spacing metric which causes these
differences.
Side note 2: Setting a background colour on the character style gives
smaller vertical extent (and of course smaller horizontal extent -
colour just behind the text). This differs by font, though.
Side note 3: A workaround is a filled box at lower z, of course...
which would be annoying for the table, and which is no explanation for
the change.

Any hints on how to track this down are appreciated!
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VerticalExtent.png
Type: image/png
Size: 195135 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20191120/cdf5e0a5/attachment-0001.png>


More information about the scribus-dev mailing list