25

When attaching text to a path in Inkscape, it seems to attach the text to the start of the path. If it's a shape, such as an ellipse then it's often placed at the start of one of the 4 ordinal points. Regardless, this is rarely where you actually want the text to be positioned so you end up nudging it into location with some spaces.

Thinking this is kind of hacky (using the spaces) I did some googling and watched several YouTube tutorials and found they are all doing the exact same thing...using spaces.

Given that other vector software typically offers up a draggable handle to allow you to move the text along the path, I thought maybe Inkscape would have something similar but I haven't found such a feature. Does it exist? Or is spaces simply the way to take care of it in Inkscape?

2

4 Answers 4

18

There is not a way to do this in Inkscape in the UI (see this bug), but you can do this using Inkscape's XML Editor.

According to the SVG specifications, you can use the startOffset attribute to indicate where you want the text to begin. So all you need to do is add that attribute to the <textPath>.

  1. In Inkscape, open the XML Editor Ctrl+Shift+X.
  2. In the XML Editor, find the <svg:text>. (You can click the text in Inkscape to jump to it in the XML Editor.)
  3. Select the <svg:textPath> child of the <svg:text>.
  4. On the right side of the XML Editor in the box next to the Set button, enter startOffset. Below it, enter the value you want to move along the path.
  5. Click Set.

This isn't ideal, but it's more exact and cleaner that using spaces or manually adjusting the kerning. If Inkscape did have a feature in its UI for doing this, it would probably be setting this attribute in the XML.

4
  • Now this is the kind of trick I like! I would have never thought to check in the xml editor. Great solution! (For now, at least...hopefully this will be fixed in the GUI eventually!)
    – DA01
    Sep 15, 2015 at 14:30
  • note that startOffset is case-sensitive
    – Ooker
    Jan 30, 2021 at 15:53
  • 2
    using the startOffset with a 50% value, and changing the textAnchor css style of the parent svg:text I have made my text always centered along my line, so thank you for the tip.
    – Enetheru
    Feb 27, 2022 at 1:36
  • 1
    @Enetheru Perfect. svg:textPath with startOffset 50% and svg:text parent with text-anchor middle. Oct 5, 2022 at 18:34
18

Found this bit in the Inkscape Manual. It actually says to use kerning to adjust the starting position of your text on a path (which isn’t far off from using spaces, unfortunately).

enter image description here

Text can be adjusted or moved relative to the path. Left: the text has been adjusted and kerned with the Alt+arrow keys. Placing the cursor at the beginning of the text and using the Alt+arrow keys will move the starting position of the text. Right: the text has been moved independently of the path by selecting the text only and dragging it to its new position with the mouse.

There is also a control element to adjust kerning in the toolbar if you select the text, when using the text tool:

enter image description here

This allows you to precisely select the offset.

4
  • which isn’t far off from using spaces – well, it’s much more precise. Also, reüsing the kerning feature here is just pragmatic – no need to be redundant.
    – Wrzlprmft
    Sep 14, 2015 at 6:57
  • @Wrzlprmft You're correct there. I was actually referring more to it being similar in function to adding spaces, and not the handle DA01 was looking for, but a good note nonetheless.
    – Vicki
    Sep 14, 2015 at 8:09
  • I like this trick, though I've found it doesn't work consistently for me. Some fonts don't let me adjust spaces. I assume that's a glitch in my particular version of Inkscape or perhaps the particular font.
    – DA01
    Sep 15, 2015 at 14:29
  • There is a kerning value limit of 1000, so I've found it necessary to use a combination of spaces and kerning together. This workflow feels like a hack, but it may be the fault of limitations in the SVG 1 spec, rather than the fault of Inkscape. (Speculating)
    – Mentalist
    Aug 12, 2021 at 13:48
5

I'm using Inkscape 0.92 on a Windows 10 PC. In the Text and Font dialog (Shift+Ctrl+T), just beneath the Font size drop-down there is another drop-down with a percentage value in it. If you put the cursor over it a hint label appears telling you that it is for Text path offset - it does the same job as editing the XML (as predicted by Scribblemacher). The drop-down only offers 10% increments but you are free to type in your own value.

3
  • On 0.92.4 (Windows): the drop-down accepts unit-less values (i.e. no %) as well which behave different than the default percentage. Negative values cause clipping. Outdated manual: tavmjong.free.fr/INKSCAPE/MANUAL/html/Text-Path.html
    – handle
    Jul 9, 2019 at 12:47
  • The % menu should hav had a +/- arrow adjustment. Thanks for helping me out with this.
    – Reidar
    Jul 26, 2019 at 17:24
  • 4
    On my machine (Win 10, version 1.02), there is no such a dropdown: i.imgur.com/vm2Xgkb.png
    – Ooker
    Jan 30, 2021 at 16:01
3

If your text happens to be on a circle, you can just simply rotate the circle:

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.