GNOME Bugzilla – Bug 169616
Improve "Text along a path"
Last modified: 2018-05-24 11:28:17 UTC
I am rather surprised not to be able to find a bug report on this topic, since it has often been discussed in #gimp and elsewhere. I have worked out a very basic implementation of it, which I present here more for discussion than anything else: it is far from being a finished product. The approach I took is to write a function "gimp_vectors_warp_vectors()" that essentially does "path along a path" -- that is, it warps one path to follow the trajectory of a second path. Text along a path is done by first converting the text into a path. For UI, I added a button to the text tool options. A better approach would be either to use a plug-in, or to have an "Along Path" checkbutton in the text tool options. For the moment, I just wanted to create the simplest possible interface that would produce a viewable result. What should I do to improve it?
Created attachment 38420 [details] [review] diff implmenting text along path Here is a diff against cvs HEAD, incorporating the changes need to implement what is described above.
This looks great! You are right that the UI would probably need to be improved, but first, I think, you should get this into CVS.
Committed to HEAD: 2005-03-09 Bill Skaggs <weskaggs@primate.ucdavis.edu> * app/vectors/gimpvectors-warp.c * app/vectors/gimpvectors-warp.h: new files implmenting "path along a path" functionality. * app/vectors/Makefile.am: new stuff added * gimp/app/vectors/gimpvectors.[ch]: actually implement gimp_vectors_real_stroke_get_length(). * app/tools/gimptexttool.c * app/tools/gimptextoptions.c: first pass at "text along a path", using new functions. See bug #169616.
Created attachment 54228 [details] [review] patch for a number of text-related files I have now reworked this completely, making it work as follows. When a text layer is created, a path is created along with it, initially a horizontal line. There is an option "Render along path" in the text tool options. If this is checked, then the path becomes visible, and the text is "attached" to it, in the sense that if you go into the path tool and alter the path, the text is redrawn to follow. You can also go back into the text tool and edit the text and its properties, and it will be redrawn following the path until you uncheck the option. The code is highly unstable and certainly a number of things are implemented incorrectly, but I am going to attach a diff for initial code review.
The path would probably have to be stored with the text, wouldn't it? The SVG snippet for the path could be saved as part of the serialization of the text layer.
Raising priority so that we review this code soon so that we can finally get it into CVS.
Copying suggestions by "Mabilat L." from bug 310624, which I am going to mark as a duplicate of this one: "text along a path" is missing some ui options. For instance, we cannot choose : - select path, same as layer for "filter > map > bum map" - position on path (in blue on screenshot) - alignement on path (in green on screenshot) - mirror effect (in red on screenshot) - no distors path (in yellow on screenshot) http://pamplemousse.truc.free.fr/tmp/UI-Options.png
*** Bug 310624 has been marked as a duplicate of this bug. ***
This patch doesn't seem to be ready for inclusion in 2.4. I suggest that we get it into CVS when 2.4 is released and implement this feature for the 2.6 release.
Let's await the GSoC 2008 project that will improve the Text Tool. Setting milestone 2.8.
The text along path function in SVN trunk generates artifacts on screen. It can be reproduced as follows: 1. Click on Text Tools 2. Type some text and click close 3. Click on "Text along Path" in the Text toolbox, multiple times. 4. Artifacts appears and cannot be removed by any means.
With the current estimates we won't have time to improve this further for 2.8, but at least the basic functionality is there. Moving to 2.10.
I came to report the same behavior Wai reported in Comment #11 If I follow those steps, the bug doesn't occur If I click "Path from Text" before "Text along Path", the artifacts appear 1. Select text tool 2. Add text to layer 3. Click "Path from text" once 4. Click "Text along Path" once An artifact appears after that If I continue clicking "Text along Path", more artifacts appear They look like selections of stacks of distorted letters I can't select them or move them I'm using GIMP 2.4.7, I believe it's the same version that is in the Debian repository
*** Bug 356664 has been marked as a duplicate of this bug. ***
Low priority compared to things on our roadmap
Current state of this bug which is a good example of why separate reports should be filled: - Behaviors in comments 11 and 13 are not bugs. By first running "path to text", you use this new path as a lead for the "text along path" (and a text is a very warped path so obviously the result is weird). This is simply not how the feature is meant to be used. NOTABUG. - Comment 4 is the only remaining request for enhancement with a tentative patch: attaching a vector to each text layer, you can warp the text layer. Editing the text would re-render the warped text (oppositely to now where if you change the text, you have to run a new "text along path" since the feature basically generates a path reproducing the text).
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/136.