Author Topic: Lock circle at the end of text with margin  (Read 494 times)

June 16, 2019, 09:35:35 AM
Read 494 times

PassTheMayo

  • Sr. Newbie

  • Offline
  • **

  • 2
I am kind of new to Inkscape, but I have a very good understanding of how it all works since I have been using paint.net for a long time. I have recently ran into a problem while creating a vector image for my website. These vectors' code will be modified on-demand for each "post" (for the sake of understanding) that is listed on my site.

I have a small circle that is at the end of a text on my vector, and it needs to stay at the end of the text at all times. This text won't ever go over one line, and would just form into an ellipsis. Here's an example of what it should look like, as I manually moved the circle into place (ignore the missing image):



Since the title of this won't always be UniX, it may become something longer, like serverlist.space. Once that happens, the circle does not move, and will hover over the text.



How do I make it so that the circle will always be at the end of the text, with some margin between them?
  • 0.92
  • Windows 10 1903

June 17, 2019, 07:12:37 AM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I'm not sure what you mean by by the vector code being modified on demand.  So I might not have the whole picture (so to speak).  It sounds like you're making a webpage?

Maybe you could use a text character, such with UniCode, rather than drawing a circle?  Then you would "type" it at the end of each text.  And it would always be at the end of the text, no matter where the text ends.  In Windows, you could use the Character Map, which you can find....well, I don't have Windows 10, but it's probably still in Accessories.   Or you could use a font which already has such a character.

If you have to use a circle rather than customized text....or even if you do use a special character, you might try right justifying the text.  Then as you type, the text "expands" towards the left.  It would never go over something on the right, like the circle.  That button is on the Text tool control bar (and I think also in the Text and Font dialog) and looks like this  :txr:

Although using right justified, the text could expand over the image to the left.   So using a text character for the circle might be the best solution.  I mean, you can't have an immovable object on both the right and left, and still have space for any amount of text in between. 


  • 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                       

June 17, 2019, 11:37:43 AM
Reply #2

PassTheMayo

  • Sr. Newbie

  • Offline
  • **

  • 2
I'm not sure what you mean by by the vector code being modified on demand.  So I might not have the whole picture (so to speak).  It sounds like you're making a webpage?

Maybe you could use a text character, such with UniCode, rather than drawing a circle?  Then you would "type" it at the end of each text.  And it would always be at the end of the text, no matter where the text ends.  In Windows, you could use the Character Map, which you can find....well, I don't have Windows 10, but it's probably still in Accessories.   Or you could use a font which already has such a character.

If you have to use a circle rather than customized text....or even if you do use a special character, you might try right justifying the text.  Then as you type, the text "expands" towards the left.  It would never go over something on the right, like the circle.  That button is on the Text tool control bar (and I think also in the Text and Font dialog) and looks like this  :txr:

Although using right justified, the text could expand over the image to the left.   So using a text character for the circle might be the best solution.  I mean, you can't have an immovable object on both the right and left, and still have space for any amount of text in between.

Thanks for the help, but sadly I cannot use a character instead of a circle because the circle will also be changing colors besides just the gray listed. And by changing on demand, I mean by every request to my site, the server will modify the SVG before it sends it to the user, so the title and subtitle messages won't always just say UniX or something else. Justifying the content to the right sounds possible, but it would just look weird in my opinion. A friend suggested that I could simply put the circle before the text so it doesn't have to move, or I could just not use a circle, and put text below the title that represents what the circle would.
  • 0.92
  • Windows 10 1903

June 17, 2019, 01:52:06 PM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Hhmm, unfortunately, I can't help with that.  I just don't know enough about what you're doing.

Is there some kind of script that will change the contents for each visitor?  I don't know of any way to have an object that automatically will move according to contents which are always changing.  Not unless that object is also controlled by the script.  I guess you could write a script that says "type this text and put this circle behind it"?

But maybe someone else can help?
  • 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                       

June 17, 2019, 02:35:05 PM
Reply #4

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Use CSS. It can also be used in SVG files. I assume ':after' works just like in HTML, but I never tried that.