line height all equal in development version

Bug #1556400 reported by Martin Owens on 2016-03-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

In the latest development version r14699, the line height of a text box is not calculated based on the text on that line. This causes 0.91 (stable) and devel to render different results for the same file.

See the attached files.

Martin Owens (doctormo) wrote :
Martin Owens (doctormo) wrote :
Martin Owens (doctormo) wrote :

This new file shows more issues with the rendering of line-height. In firefox the 10px floating text is shown much close together, in inkscape 10px is about the same as 200% (which for 15pt font is daft). OTOH the text box (which firefox doesn't render at all) needs 40px of line height to get to 200% (which is good I think being 133% from pt to px)

So there are rendering differences between text box and floating text. Highlighted by the recent addition of line height units.

Tavmjong Bah (tavmjong-free) wrote :

One issue described in #3 is due to the patch that added support for units on the text/tspan 'x' and 'y' attributes. SInce the patch, Inkscape has been writing out '0' for single 'x' and 'y' values. When Inkscape renders the text, it recalculates the line positions which masks the problem.

Note: the "text box" uses SVG 1.2 multiline text which is not implemented in any browser. SVG 2 replaces this with CSS based multiline text.

Tavmjong Bah (tavmjong-free) wrote :

I forgot to mention, r14716 fixes the problem described in #4.

Martin Owens (doctormo) wrote :

After the fix the output span x, y is now incorrect in firefox regarding the fixed line height. The rendering in inkscape is unchanged. See attached rendering.

Tavmjong Bah (tavmjong-free) wrote :
Tavmjong Bah (tavmjong-free) wrote :

There are four ways to produce multi-line text in Inkscape:

1. Use 'white-space' property with value 'pre-line'.
2. Inkscape's 'sodipodi:role="line".
3. SVG 1.2 text wrapping.
4. SVG 2 text wrapping.

Only 2 and 3 are currently available via the GUI.

The attachment is a test for all four methods for both absolute and relative values of 'line-height'

su_v (suv-lp) on 2016-12-24
tags: added: text
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers