Can't type text with whitespaces at end (without adding 'xml:space="preserve"')

Bug #1514077 reported by Roul P.
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
New
Wishlist
Unassigned

Bug Description

If I write normally text the whitespace get always trimmed at the end, so you need always go back and put this space between characters. Tested on Windows 7 x64 German, and on Linux Mint 17.2. Inkscape-Version 0.91 r.

Tags: svg text
Roul P. (perhelion1)
tags: added: text
Revision history for this message
su_v (suv-lp) wrote :

Which installer package did you use for Inkscape 0.91 - 32bit or 64bit?

Could you please provide detailed steps to reproduce? What does "Can't type text with whitespaces running" mean exactly - does it trim trailing whitespace, or delete all spaces which separate the words on the current line?

Does it happen in a new document based on the default template, too?
Does it happen with default preferences?

Changed in inkscape:
status: New → Incomplete
Revision history for this message
Roul P. (perhelion1) wrote :

Hej suv,
yes I made this report a bit fast. I tested now more. It is in 32 and 64bit, in Windows (7 x64) and Linux (Mint 17.2), Inkscape 0.91r (I the same appearance in 0.48).
This seams happen if you remove proprietary Inkscape code from the text tags, so not in a new document (and only the last whitespace).

It is also impossible to add new lines to the text, which is maybe another bug (seams missing of sodipodi:role="line", removed if we save as "Normal SVG").

 I attached an testcase (Inkscape text is the only text with all proprietary code, so editing is possible). I use default preferences.

summary: - Can't type text with whitespaces running (Windows only)
+ Can't type text with whitespaces (without proprietary code)
Roul P. (perhelion1)
summary: - Can't type text with whitespaces (without proprietary code)
+ Can't type text with whitespaces at end (without proprietary code)
description: updated
Revision history for this message
su_v (suv-lp) wrote : Re: Can't type text with whitespaces at end (without proprietary code)

On 2015-11-09 13:14 (+0100), Roul P. wrote:
> It is also impossible to add new lines to the text, which is maybe
> another bug (seams missing of sodipodi:role="line", removed if we
> save as "Normal SVG").

This part about the newlines is technically not really "bug" - saving in a format (for example 'Plain SVG', or 'Optimized SVG') which omits custom information stored by the authoring/editing tool for editing, this is kind of expected (SVG 1.1 text objects do not implement multi-line text natively [1]). Apart from the editing issue, text loaded from SVG files saved as 'Plain SVG' is rendered correctly (based on the information in the SVG source file).

This particular issue (about the newlines) is discussed in bug #366744 (and also in recently filed bug #1514050). The same underlying issue was also reported in bug #276456 by extension authors.

--
[1] See also http://www.w3.org/TR/SVG11/text.html#Introduction

Changed in inkscape:
status: Incomplete → New
Revision history for this message
su_v (suv-lp) wrote :

Proposing to link as duplicate to
* Bug #167647 (sf1500875) “0.44pre2: newlines in text problem”
  https://bugs.launchpad.net/inkscape/+bug/167647
(missing attribute for whitespace handling in the <text> objects of the custom-authored SVG file)

Note that adding the attribute via XML Editor during the current editing session does not work without saving and reloading (bug #1406501).

Revision history for this message
Roul P. (perhelion1) wrote :

Ok thanks for your analyze.
Then we put away and ignore the newline behavior.
So I mean this not a duplicate report.

To add a "new word" to simply text, can't be request an extra proprietary code, which has no definitions in SVG 1.1 natively.

So this is only a request to add/edit a simple text-line for standard SVG (without Inkscape code).

Revision history for this message
Roul P. (perhelion1) wrote :

The current situation is, text-editing via XML Editor is easier as with the Inkscape GUI. (Sorry if this truth sounds a bit painful.)

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

On 2015-11-09 16:00 (+0100), Roul P. wrote:
> So I mean this not a duplicate report.
(…)
> To add a "new word" to simply text, can't be request an extra
> proprietary code, which has no definitions in SVG 1.1 natively.

The 'xml:space' attribute is not proprietary code:
http://www.w3.org/TR/SVG11/text.html#WhiteSpace

Please note that any action with regard to the whitespace handling with <text> elements which lack the 'xml:space="preserve"' attribute (e.g. failure to append a space character) will be tracked in the mentioned report (it was discussed for example to «Add xml:space="preserve" temporarly while the user is editing the text, and revert this setting to the original setting when the text box loses its focus.»). This report will not be notified about changes tracked in the other report.

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

On 2015-11-09 16:00 (+0100), Roul P. wrote:
> So this is only a request to add/edit a simple text-line for
> standard SVG (without Inkscape code).

Setting bug status to wishlist based on the reporter's feedback. Note that bug #167647 tracks the underlying issue which triggers "Can't type text with whitespaces at end".

Changed in inkscape:
importance: Undecided → Wishlist
tags: added: svg
su_v (suv-lp)
summary: - Can't type text with whitespaces at end (without proprietary code)
+ Can't type text with whitespaces at end (without adding
+ 'xml:space="preserve"')
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.