It is currently Thu Apr 25, 2024 12:46 am


All times are UTC - 5 hours [ DST ]



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

Joined: Jan 20, 2013
Posts: 14816
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.

_________________
"Where am I ?"


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: 4739
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
User avatar

Joined: Jan 20, 2013
Posts: 14816
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".

_________________
"Where am I ?"


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: 4739
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
User avatar

Joined: Jan 20, 2013
Posts: 14816
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...).

_________________
"Where am I ?"


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: 4739
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
User avatar

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

_________________
"Where am I ?"


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: 2253
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: 4739
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: 2424
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 subject: Re: Text along path
PostPosted: Tue Oct 03, 2017 8:24 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: Aug 08, 2016
Posts: 1988
Location: East Midlands of England
My twopenny-worth:

I was recently mulling over adapting my script to use all fonts and not just my own joined-up fonts - although this seems to go against the original reason writing the script in the first place.

I am interested in hearing Dinasset's purpose behind using a script such as the one he has in mind. Is it to use the repeating text as a decorative device? Or is it to provide a background effect for one of his many other filters? As others have pointed out, the abrupt changes in paths around most objects lead to severe deformations - stretching and compressing the paths. Any compensating filters would have a serious amount of work to do to avoid unpleasant looking side-effects.

My attempts at keeping the integrity of the letter shapes led me down the route of creating a layer for each separate letter and then (optionally) merging the layers together.

Here are some of the results using Gimp 2.9.7 - Partha's portable version - with a long text string around an oak leaf.

First image: Gimp's own Path to Text with my Italic Variations font at 60pt. You can clearly see the deformations.

Attachment:
TAP_defaultsettings.jpg
TAP_defaultsettings.jpg [ 657.96 KiB | Viewed 1363 times ]


Second image: My script with default settings at the same size. Letter shapes show less deformations and the text finishes at the end of the path - but not a satisfactory outcome.

Attachment:
TAP_JoinedUpDefaults.jpg
TAP_JoinedUpDefaults.jpg [ 539.29 KiB | Viewed 1363 times ]


Third image: With the smallest amount of extra space between individual letters. Better or worse - I can't tell!

Attachment:
TAP_JoinedUpExtraSpacing.jpg
TAP_JoinedUpExtraSpacing.jpg [ 540.81 KiB | Viewed 1363 times ]


Conclusion: Same as everybody else - a lot of manual work/tweaking involved in creating a pleasant effect it seems.

_________________
Image

"Let no one steal your dreams."
Paul Cookson


Latest plug-in update: Paragrapher v.1.4
Custom Font Links
Tools
Character Paths
White Bases


Top
 Post subject: Re: Text along path
PostPosted: Tue Oct 03, 2017 9:15 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
As written in the initial request, the idea is to use "text along path" not only for paths with very limited length but also for long or very long paths by "repeating" the input string.
Initially I was thinking about the contour of an object but after Ofnuts' comment on the bad results which can come out from non smoothed transitions (you confirm), I'm now more of the idea of using created paths around or inside the object.

_________________
"Where am I ?"


Top
 Post subject: Re: Text along path
PostPosted: Tue Oct 03, 2017 10:27 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
The one thing that has always gotten me was when one stubborn letter, usually in the middle of a sentence, would face the opposite direction.

_________________
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: Wed Oct 04, 2017 7:55 am  (#14) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
OK, got something working, just have to do some more testing and write the doc before publishing.

Attachment:
TextAlongPath-repeated.png
TextAlongPath-repeated.png [ 54.44 KiB | Viewed 1331 times ]

_________________
Image


Top
 Post subject: Re: Text along path
PostPosted: Wed Oct 04, 2017 8:33 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Wonderful, thanks a lot Ofnuts !

_________________
"Where am I ?"


Top
 Post subject: Re: Text along path
PostPosted: Sat Oct 07, 2017 3:23 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Aug 08, 2016
Posts: 1988
Location: East Midlands of England
Playing with my next version - to see if repeat along path will work.
Seems to be do-able - in some form at least.

"Hello " entered into the text box and set to auto-repeat.

Attachment:
Hello.png
Hello.png [ 187.22 KiB | Viewed 1275 times ]

_________________
Image

"Let no one steal your dreams."
Paul Cookson


Latest plug-in update: Paragrapher v.1.4
Custom Font Links
Tools
Character Paths
White Bases


Top
 Post subject: Re: Text along path
PostPosted: Sat Oct 07, 2017 6:48 pm  (#17) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
The devils is in the details.. how to deal with the kerning when you splice the character string to itself, for instance.

I also uncovered a Gimp shortcoming that was already at play in the older version, but is more visible in the newer version where the likeliness of small characters is higher. Fixed now, but I took me several hours to figure out.

Image

_________________
Image


Top
 Post subject: Re: Text along path
PostPosted: Sun Oct 15, 2017 8:26 am  (#18) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
Attachment:
Announce.png
Announce.png [ 86.07 KiB | Viewed 1182 times ]

_________________
Image


Top
 Post subject: Re: Text along path
PostPosted: Sun Oct 15, 2017 8:34 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Fantastic, Ofnuts.
Thanks a lot.

_________________
"Where am I ?"


Top
 Post subject: Re: Text along path
PostPosted: Sun Oct 15, 2017 8:57 am  (#20) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
First quick and simple example of use.
Attachment:
Sunflower_repeated text.jpg
Sunflower_repeated text.jpg [ 251.33 KiB | Viewed 1180 times ]

_________________
"Where am I ?"


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

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) ofn-text-path-selection

14

No new posts Aligning Text on a Circle Path

2

No new posts Attachment(s) No scrollomg interface for text logo bend path

7

No new posts Attachment(s) i struggle with the option to copy the path - the path where a file i

3

No new posts Attachment(s) Bend Text-Logo as helper Ofn-bend-path

75



* Login  



Powered by phpBB3 © phpBB Group