17

Using Inkscape's latest official release, I created a text element, and would like to underline its text (or part of it).

How to do that?
I don't see any option to underline.

19

The support for the text in Inkscape is improved in these years, but there are some feature not yet implemented.

SVG standard supports text decoration and Inkscape aims to be fully compliant with SVG standard, so I've tried to add this properties at xml level, and it worked:

text-decoration: underline;

It's very simple to do: after typing your text, press the button for the XML editor:

XML editor

Your text is selected, and the corresponding XML node is selected in the editor (there is no need to find something). Now, you need to click on "style" row, add the desired CSS style at the end of the current style, (e.g. text-decoration: underline;), using a semicolon ";" as separator, and press the Set button:

Set your change

Once the attribute value is set, you see your text underlined:

Underlined text

Be aware that in order to remove the underline you need to find it in the XML attribute value and delete it manually (it's not difficult).

  • Do you know if this is possible to do on a part of a text box only? – Luis Aug 2 '17 at 14:25
  • 3
    For a part of the text box the fastest way I've found is to select the text using the Text and font tool of Inkscape, changing the style of the selected text, open the XML editor and edit the svgFlowSpan section created by the tool itself. – Paolo Gibellini Aug 2 '17 at 16:14
  • There are two caveats, though. First, editing the surrounding text will often cause inkscape to "clean up" the XML markup and silently remove the underlining. Second, when converting to PDF (or converting text to paths in general) all underlining will also be silently removed: bugs.launchpad.net/inkscape/+bug/1467794 – a3nm Jun 8 '18 at 10:10
  • Thank you, @a3nm, feel free to edit my answer to add both the caveats. – Paolo Gibellini Jun 8 '18 at 21:32
1

This feature is currently being developed, so it is not available yet.

An option is to use a custom build, including this patch:
https://bugs.launchpad.net/inkscape/+bug/1269206

Hopefully the patch will be merged into the main release soon.

  • This is one possible option, but you need to apply this patch to every new version of Inkscape (until it is not available in the official release) and repeat this for each of your working station. – Paolo Gibellini Feb 15 '16 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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