Editing text baseline

Post questions on how to use or achieve an effect in Inkscape.
FrenchGuy

Editing text baseline

Postby FrenchGuy » Fri Dec 10, 2010 11:03 pm

Hello,
usually, when creating text in Inkscape, there is a little white square at the bottom left of the text (which defines the baseline).
I need to open and edit SVG objects in Inkscape, but the texts included in these files don't have the white square at the right place (see the attached image)
Image

Is it possible to move it at the right place, because it causes problems when resizing and exporting etc. ?
Thank you in advance !

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Editing text baseline

Postby brynn » Sun Dec 12, 2010 7:16 am

Hhm, curious Image
Well, the little square does more than just define the baseline....and it may be that it just coincidentally defines the baseline, I'm thinking just because of your example where it doesn't. It's also the text handle, which can be used to snap....and maybe other for other things, I'm not sure.

I know that if you change how the text is justified (left, right, centered) the little box moves (to the left, right, or center). I'm just playing around with some sample text, while I try to find some answers for you. And I see that if I rotate the text, the little box...handle, the handle rotates right along with it. Oh, ok! If you change it to vertical text (just below the justification buttons), the handle is moved away from the text, like in the text at the bottom of your example. But I can't figure out how the handle gets to be on the side, like in the text on the left side of your example.

Ok, well I've managed to get the handle on the side of the text, but I doubt this is how the original creator did it. Starting with a single digit, set to centered just., using the text tool control bar, rotate 90 degrees, set to vertical text, then using Selector tool, rotate back. But adding a 2nd digit gets trickier, because when you rotate, the spacing is all off. So clearly, this is not how it was done.

My first thought, when I read your message the first time, was that the placement of the handle must have happened in whatever program or technique the creator used. Do you have that info, or know anything about that?

And you said that when you resize and export is where this causes a problem. But I'm not aware of the text handle affecting resizing or exporting. Can you show us the result of resizing, and how the text handle is causing it?

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Editing text baseline

Postby ~suv » Sun Dec 12, 2010 9:55 am

You can use 'Text > Remove Manual Kerns' to align the character(s) with their baseline anchor, but it is not possibly to my knowledge to realign the baseline anchor with the current position of the character(s).

Seems like you originally imported a PDF file created e.g. with gnuplot or a similar application (or possibly an exported SVG file from there?). See 'Text editing tips' (from the Release notes 0.46) about why text from imported PDF files has each glyph positioned individually (through shifting or manual kerns), and how to edit/replace this kind of text.

In Inkscape you can 'detach' the glyphs from the baseline anchor by highlighting the letter in the text tool and using 'Alt+cursor keys' (or the GUI controls on the text tool controls bar in Inkscape 0.48) to shift the selected characters relative to their baseline.


Return to “Help with using Inkscape”