It is currently Sun Oct 22, 2017 1:28 am


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Text along path
PostPosted: Sun Oct 01, 2017 12:23 am  (#1) 
Offline
GimpChat Member

Joined: Jan 20, 2013
Posts: 6825
Location: roma, italy
GIMP Version: 2.8.22
Operating System: Windows
GIMP Experience: Basic User

List any relevant plug-ins or scripts:
text along path



If I have a very long path (for instance a contour of a flower) and I would like to see the contour "stroked" with a text such that the letters have a fixed space between each other and the text is "repeated" as many time as needed to fill the whole path, my question is:
- if this isn't already possible with the current status of the filter (if so: how to use the parameters correctly?), is this easily possible with an enhanced version of the filter (e.g with an additional parameter: repeat the entered text as many times as needed to fill the path)?
Thanks.

_________________
Vanitas vanitatum et omnia vanitas.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Text along path
PostPosted: Sun Oct 01, 2017 3:42 am  (#2) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 3665
dinasset wrote:
GIMP Version: 2.8.22
Operating System: Windows
GIMP Experience: Basic User

List any relevant plug-ins or scripts:
text along path



If I have a very long path (for instance a contour of a flower) and I would like to see the contour "stroked" with a text such that the letters have a fixed space between each other and the text is "repeated" as many time as needed to fill the whole path, my question is:
- if this isn't already possible with the current status of the filter (if so: how to use the parameters correctly?), is this easily possible with an enhanced version of the filter (e.g with an additional parameter: repeat the entered text as many times as needed to fill the path)?
Thanks.

1) no
2) more complex than you think, because if you don't want a visible seam (a place where the text ends abruptly), you have to ensure that the text is sized so that an integer multiple of it exactly fills the path. But there are several options that conflict with that (for instance the spacing, which is absolute (in pixels) and not relative). Another problem is handling the spacing between each copy of the text.

Doable, but far from being a quick hack.

_________________
Image


Top
 Post subject: Re: Text along path
PostPosted: Sun Oct 01, 2017 5:21 am  (#3) 
Offline
GimpChat Member

Joined: Jan 20, 2013
Posts: 6825
Location: roma, italy
Thanks for your reply, ofnuts.
About the problems you explain:
a) if the path is very long (as the one coming out from a real object contour can be) and the text enough short, couldn't it be applicable the same logic the filter does already have to "fill" the path with the single letters? I mean: considering the text (which could have a size limited in nr of chars) as a "single" component and "spreading" it along the path.
b) the spacing between each copy of the text could be implicit (spaces at the end of the text) or explicit (a user parm).
But I understand in any case the "complexity".

_________________
Vanitas vanitatum et omnia vanitas.


Top
 Post subject: Re: Text along path
PostPosted: Sun Oct 01, 2017 6:40 am  (#4) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 3665
a) that would be very different. To "spread" a short text I just add space. Here I would have to compute the width of the raw text (there is already a function for this), then divide the path length by this to find the number of occurrences, then round it to nearest integer, then see how much/less I have to shrink expand the text, see if by any chance I should switch to another size of the font to minimize distortions (because we are talking about small text sizes, and in small size the fonts are not exactly proportional).

b) yes.

_________________
Image


Top
 Post subject: Re: Text along path
PostPosted: Sun Oct 01, 2017 8:52 am  (#5) 
Offline
GimpChat Member

Joined: Jan 20, 2013
Posts: 6825
Location: roma, italy
Thanks again, Ofnuts.
If I understood correctly your comments so far, the biggest difficulty is to guarantee that all the occurrences of the text be complete; if we remove this requirement and the user accepts to see the last occurrence of the text truncated, would it be (relatively) easy to add an option which asks: "repeat this text up to the path end (last may be truncated)"?
If a text is repeated tenth (or hundreds) of times I personally do not see a big problem to have the last occurrence truncated (probably it would be even rarely detected...).

_________________
Vanitas vanitatum et omnia vanitas.


Top
 Post subject: Re: Text along path
PostPosted: Sun Oct 01, 2017 2:32 pm  (#6) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 3665
dinasset wrote:
Thanks again, Ofnuts.
If I understood correctly your comments so far, the biggest difficulty is to guarantee that all the occurrences of the text be complete; if we remove this requirement and the user accepts to see the last occurrence of the text truncated, would it be (relatively) easy to add an option which asks: "repeat this text up to the path end (last may be truncated)"?


It would be just as difficult (if not more difficult) because you would have to figure out where to cut the text on the last copy.

dinasset wrote:
If a text is repeated tenth (or hundreds) of times I personally do not see a big problem to have the last occurrence truncated (probably it would be even rarely detected...).

If it's in my code it's a problem because it spells "sloppy work" with my name on it. But I'm ready to bet that this will show up at the most inconvenient places.

Anyway the problem isn't that much the path length but the path complexity. When doing text-along-path, you have to space the letters more when the radius of of curvature is small (under 5x the font size, roughly) otherwise you can have overlaps. In a path from a natural object, you are going to see a mix of large and small radiuses, so unless there is some adaptative spacing something won't look good somewhere.

_________________
Image


Top
 Post subject: Re: Text along path
PostPosted: Sun Oct 01, 2017 10:08 pm  (#7) 
Offline
GimpChat Member

Joined: Jan 20, 2013
Posts: 6825
Location: roma, italy
Got it.

_________________
Vanitas vanitatum et omnia vanitas.


Top
 Post subject: Re: Text along path
PostPosted: Mon Oct 02, 2017 10:52 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2134
Location: Retired Moderator Slowly Returning to the Living.
What I have done is to run it and see how far it goes. Then undo it and run it again with the text line repeated how ever many times I think it should be. I REPEAT this until it's close to reaching the end. Then I re-run it varying the settings until it reaches correctly. Sometimes I add an extra space or two , to make it come out right. It's kind of trial and error.

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Post subject: Re: Text along path
PostPosted: Tue Oct 03, 2017 1:31 am  (#9) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 3665
PhotoMaster wrote:
What I have done is to run it and see how far it goes. Then undo it and run it again with the text line repeated how ever many times I think it should be. I REPEAT this until it's close to reaching the end. Then I re-run it varying the settings until it reaches correctly. Sometimes I add an extra space or two , to make it come out right. It's kind of trial and error.


If you use a very short path the error message will tell you how wide the text is. If you use my ofn-path-edits script there is a function that tells you how long your "shape" path is. Then you can divide one by the other and make the necessary copies.

_________________
Image


Top
 Post subject: Re: Text along path
PostPosted: Tue Oct 03, 2017 3:30 am  (#10) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 1176
I know dinasset will be looking to automate into a script, but all the points of difficulty that were raised. Text along a path, using say, a flower outline.

Image

Spacing the text, acute corners, a PITA. Manually using the old text editor makes it a little easier. Still a lot of trial and error. This using Gimp 2.9.7 which at least has fixed the text tool, a small overrun no longer shoots off to a corner.

_________________
Image


Top
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Text to Path

4

No new posts TEXT TO PATH?

6

No new posts text to path

13

No new posts Attachment(s) text to/along path

6

No new posts Attachment(s) Text to path

4



* Login  



Powered by phpBB3 © phpBB Group