Can't type spaces in imported PDF text

Bug #275184 reported by Guillermo Espertino (Gez)
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

I'm having a problem with some imported PDFs. When I try to edit some text (removing manual kernings before doing it) I can enter type but not spaces. The only workaround is to enter the whole text without spaces between words, then inserting spaces in-between.
Please notice that this is not a complain about having to remove manual kernings before editing. It's something else.

I attach a file with a simple PDF created from OpenOffice Writer.
To reproduce the described behavior, import the pdf file into inkscape, select the text, remove manual kerning and edit. Spaces can't be typed after words, but the can be inserted after, between the words.

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :
su_v (suv-lp)
tags: added: importing pdf text
Revision history for this message
su_v (suv-lp) wrote :

Not reproduced with Inkscape 0.47pre4 on OS X 10.5.8

I can insert spaces while inserting (typing) new text into the 'this is a test' sentence. Maybe related: I do not have the font 'OgilveTwoBold' installed and all text is rendered with the default font 'Bitstream Vera Sans'.

Gez - do you still see this issue with current prerelease versions?

Changed in inkscape:
status: New → Incomplete
Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Reproduced in dev version. When you try to type a space in the middle of the text, the remaining letters are not adjusted. This is because Inkscape does not handle updating text with absolute kerning properly.

Changed in inkscape:
status: Incomplete → Confirmed
summary: - Can't type spaces in imported PDF text
+ Broken editing of text with absolute kerning
Revision history for this message
Krzysztof Kosinski (tweenk) wrote : Re: Broken editing of text with absolute kerning

More precise test case:
1. Open the file attached above
2. Select text tool and position the cursor somewhere in the middle of the text
3. Try to type any text
4. Notice that letters to the right of the cursor do not move, and newly typed letters are placed on top of them
5. The problem disappears when you select "Remove Manual Kerns" from the Text menu

Changed in inkscape:
importance: Undecided → Medium
Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Oops, I didn't spot the part where the reporter removes manual kerning.

summary: - Broken editing of text with absolute kerning
+ Can't type spaces in imported PDF text
Changed in inkscape:
status: Confirmed → Invalid
Revision history for this message
Dmytro Lapshyn (dmytrol) wrote :

I am not sure why is this bug marked as invalid. I am facing the very same problem with text on a diagram that has been imported from an Adobe Illustrator file. Not possible to type whitespace and kerning visually differs from that in the original text object.

Revision history for this message
jazzynico (jazzynico) wrote :

IMHO it should work even if user removes manual kerning (it also affects text imported from PDF created with Inkscape...).
The issue seems to be due to:
1. The xml:space="preserve" attribute is missing in the text element.
2. The fact that imported texts kern with the x attribute (which prevent xml:space="preserve" from working), instead of the dx attribute when kerning is done with the Inkscape UI.

Workaround:
1. Add xml:space="preserve" to the text element.
2. Reload the file (xml:space doesn't work live, probably another bug, to be confirmed).

Possible fix:
Automatically add the xml:space="preserve" attribute when removing manual kerns that use the x attribute?

Changed in inkscape:
status: Invalid → Confirmed
Revision history for this message
jazzynico (jazzynico) wrote :

Related: Bug #166928 'Bad cursor movement in text without xml:space="preserve"' <https://bugs.launchpad.net/inkscape/+bug/166928>

Revision history for this message
jazzynico (jazzynico) wrote :

Follow-up report (xml:space update issue): Bug #1406501 "xml:space attribute changes need document reload" <https://bugs.launchpad.net/inkscape/+bug/1406501>

Revision history for this message
Jonathan Hofinger (jhofinger) wrote :

Hi, this issue has been reported to Gitlab: https://gitlab.com/inkscape/inkscape/issues/297. Please continue discussion over there. The other part related to xml:space is being treated in the follow-up reports.

Closed by https://gitlab.com/jhofinger

Changed in inkscape:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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