Comment 5 for bug 1652340

Revision history for this message
su_v (suv-lp) wrote : Re: [Bug 1652340] Re: Extension for 0.92.x to fix line spacing in legacy documents

On 2016-12-23 22:52 (+0100), Hachmann wrote:
> In that same file, the extension also inserts a superfluous(?) period
> above the 'dieses'.

There is an empty flowed text object in the document near that position
(id="flowRoot23315") ... i.e. a blank line (at least with the simple
logic the extension currently uses). I'll try how much effort it is to
detect and ignore such objects (there will be plenty of them around in
many Inkscape files out there - Inkscape does not auto-clean flowed text
elements if a text frame is drawn, but no text entered subsequently).

> (1a. Btw. is it to be expected that I get an 'update document' in the
> history, and a changed file indicator asterisk in the window title,
> without having seen any popup about dpi changes? No changes in the svg
> tag in the XML editor.)

Unrelated to this extension - 'Update Document' is something that is
done internally by inkscape itself [1]: it might update legacy guides
(adding new status for locking guides) or grids (internal change from
absolute units to user units) or perspective definitions (in case there
are 3D boxes used in the document).

> 2. In a file (...)

Please attach.

> 3. In the file 'Programm_Flyer_Entwurf_2016', the extension inserts
> really many full-stops (at the bottom right, 'Aussteller', but also at
> 'Öffnungszeiten'), although there aren't any blank lines. Are they all
> justified?

As commented earlier (comment 2), there is a logic flaw in the current
extension code to "fix blank lines"; and as mentioned in the README file
in the gitlab repo there is an Inkscape bug which prevents that the
intended workaround for legacy files to insert a space (instead of the
'.' placeholder character) can be used at the moment. I'll be happy to
use your file as test case once I have rewritten the fix_blank_line()
function in the extension to improve the detection of which tspans could
be (or had been) intended to act as blank lines, and how large the
computed font size of the line above is (that's the trickier part).

[1]:
https://bazaar.launchpad.net/~inkscape.dev/inkscape/0.92.x/view/head:/src/file.cpp#L722