Support <flowDiv/> in sp_file_convert_text_baseline_spacing()

Bug #1661771 reported by su_v
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
su_v
0.92.x
Fix Released
Low
su_v

Bug Description

Inkscape's flowed text implementation supports to render text layout defined with <flowDiv/> elements, even while there is no GUI available to author/write such elements. Two of the files in 'share/examples' also use them (flow-go.svg, flowsample.svg).

The update routines in Inkscape >= 0.92.x to adjust baseline spacing of regular and flowed text in legacy Inkscape SVG files ideally will also support existing Inkscape SVG files with such partially supported elements.

A related test case has been uploaded to this repository, along with PNG exports from several different Inkscape versions for comparison:
https://gitlab.com/su-v/test-files/blob/master/line-spacing/
https://gitlab.com/su-v/test-files/blob/master/line-spacing/wiki_cartography_svg__basic__by_hugolpz-d4q23r0.svg
(the available reduced test cases will be attached to this report as well.)

Attached is a patch based on Tavmjong's feedback on irc (#inkscape-devel) on 2017-02-03:
20:58 Tavmjong : su_v: Line 77 in file-update.cpp should have SP_IS_FLOWDIV(i) added to the 'or'.
which has been updated for the other checks.

Please review the proposed extended patch for any obvious mistakes (C++, logic), and test for any possible regressions.

Scope of the patch:
1) Proposed patch needs to be tracked as 0.92.x task (ideally, to be included in 0.92.1 if accepted by the release manager, else milestoned to 0.92.2).
2) Proposed patch needs "forward"-porting like all other related changes with regard to internal adjustment of baseline spacing in legacy documents on load (not available in lp:inkscape yet).

Tags: text

Related branches

Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
su_v (suv-lp) wrote :

Updated patch without extra parentheses (cf Mc on irc)

Revision history for this message
Mc (mc...) wrote :

pushed to trunk r15481, still needs backporting to .92.2 (or .92.1, diff is very low-risk)

Changed in inkscape:
importance: Undecided → Low
assignee: nobody → su_v (suv-lp)
status: New → Fix Committed
milestone: none → 0.93
tags: added: backport-proposed
Revision history for this message
jazzynico (jazzynico) wrote :

Targeting to 0.92.2 for now. Don't hesitate to change is the patch is accepted for 0.92.1.

Revision history for this message
jazzynico (jazzynico) wrote :

Fixed in lp:inkscape/0.92.x rev. 15386.

su_v (suv-lp)
tags: removed: backport-proposed
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.