gotcha

Author Topic: Convert SVG to PNG with Underline  (Read 3463 times)

July 13, 2016, 02:58:01 AM
Read 3463 times

pranavcp

  • Newbie

  • Offline
  • *

  • 1
Hi,
I am using CentOS6 with Inkscape 0.49 on it as latest version is not avail for that but for ubuntu only. I am converting SVG to PNG with command

inkcape -z product_1.svg -e product_1.png

which gives me perfect output but not for the underlined texts.

Any solutions for the same, as It is very important feature and want to implement the same.

July 13, 2016, 03:25:10 PM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to Inkscape Community!

It sounds like you're using the command line, and I'm not very familiar with that.  The Inkscape Text tool doesn't provide for underlines (although it seems like I've seen that will be available in the next few new versions).  So if you want to have underlined text, you have to actually draw them yourself, using Pen or Pencil tool.

But somehow, it looks like you've been able to make underlines!  Did you paste the text in, which was created somewhere else?  Or did you use the command line to create it? 

When I use File menu > Export PNG, it exports the underline.  So I'm not sure if it's a deficiency with the command line?  Although, I did edit the file a bit, before I made that export.  Let me try without changing anything....  Hm, no, the underlines came through perfectly!

Let me ask, do you know if the command you used accesses the same function that Export PNG provides?  It must be somehow different.  Would you be able to use the Export PNG dialog, rather than the command?

Edit
Or maybe it's something about what you're viewing the PNG with?  Because look at the attachment below.  It shows the underline.  But if you click on it, which will bring it up to full size (in a new window), the underline isn't showing!
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 14, 2016, 04:25:01 AM
Reply #2

ugajin

  • IC Mentor

  • Offline
  • ******

  • 10
Using the XML editor (v0.91), add a style attribute to the 'tspan' element (not the text element), with the value 'test-decoration: underline'.

- u

July 14, 2016, 04:17:56 PM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome ugajin!

You're saying that by using the XML Editor, it's possible to create underlined text?  If underlining isn't added to the Text tool pretty soon, I'll probably be using that!  I haven't written any tutorials lately, but that will be very handy.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 15, 2016, 04:13:39 AM
Reply #4

ugajin

  • IC Mentor

  • Offline
  • ******

  • 10
Yes; none, underline, overline, and strikethrough, seem to work with the XML Editor in Inkscape v0.91. You can also paint (stroke & fill) text a different colour to the decoration,. Sadly, Inkscape omits the decoration when converting Object to Path, at lest it does on OS X.

-u

July 16, 2016, 01:49:59 AM
Reply #5

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Hey, I just came across an extension for underlining text!

I haven't tried it yet, but here's the link:  https://github.com/mcjohnalds/inkscape-underlinetext

Just fyi....is a little bit off topic, but can't hurt to have related info in one place :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 16, 2016, 03:37:43 AM
Reply #6

ugajin

  • IC Mentor

  • Offline
  • ******

  • 10
s/at lest it/at least it/.

This may also be off topic: https://bugs.launchpad.net/inkscape/+bug/1269206.