GNOME Bugzilla – Bug 102822
Outlined text
Last modified: 2018-05-24 10:49:09 UTC
It would be nice to be able to produce text with an outline. I guess that X doesn't directly support drawing characters with borders. A quick hack would be to do something like: alpha to selection -> stroke after the text is rendered. I have modified the gdyntext plugin to do this (using the current brush) I haven't thought of the UI part yet. For sure, a toggle is needed. Another thing could be a brush selector or a thickness value. Possible issues with antialiasing?
The gimp-freetype plug-in can create bezier paths from fonts. For GIMP-1.3, we don't use X11 font rendering any longer and creating paths from text is on my TODO.
Changes at the request of Dave Neary on the developer mailing list. I am changing many of the bugzilla reports that have not specified a target milestone to Future milestone. Hope that is acceptable.
I know Sven is actually working on this for the 2.0 text tool. Marking 1.3.x
I tried this with brush-stroked outlines. Looks acceptable for large brushes but overall not satisfactory. If we'd use libart to stroke paths (which would be darn simple), we could implement this easily. Looks like a feature for 2.2 though.
*** Bug 125218 has been marked as a duplicate of this bug. ***
With the new stroke API it should be so darn simple, it might even make it into 2.0 still...
The FreeType2 authors seem to be adding stroking to freetype as well so perhaps it makes sense to use that for outlined text.
This won't happen for 2.2, moving to the Future milestone.
I'm not clear on what this bug report is asking for now. Certainly it is possible in 2.2 to convert text to a path and then libart-stroke the path. What more is needed to resolve this?
There would be an addition to the text tool options that allows to set the Outline style and color and outlined text would be editable.
The preview would also change as the properties and the text are changed. In other words, the path conversion and stroking should be transparent to the user.
Preview? What preview?
The things described in comment #11 would happen automatically if the things described in comment #10 were done. (The text tool does not use a preview, it repaints the layer each time you change the text.)
Is anyone working on this? I think there's a need for: - Extension to xcf text layer format to support outlines. - Outline GUI inside text tool properties. - Outline drawing code. Do I miss anything? I think this is a very useful and needed feature.
The standard response to a question like this is "GIMP is an open source project, coded by volunteers, so if you want it, why aren't you working on it?". But it would probably annoy you if I said that, so I won't.
It would be pretty much straight-forward to add this feature. If anyone wants to work on, ask me, I will try to help and answer questions as much as possible.
Created attachment 195898 [details] [review] outlined-text-patch I'm attaching a simple patch that adds the bits missing to 'stroke' or 'stroke & fill' text layers. For the outline it is possible to choose one single color per text layer and the line width is, now, fixed to 2. Loading an xcf with text layers outlined in a non patched GIMP (also 2.6), initially shows the text outlined, but whatever causes rerendering the text looses the outline. Feedback appreciated.
Created attachment 195899 [details] A sample outlined text layer it is possible to open it with gimp-2.6 also.
I completely forgot about this one, this makes me immediately think in terms of the GipmFillOptions/GimpStrokeOptions objects, maybe we need to think bigger here?
*** Bug 748350 has been marked as a duplicate of this bug. ***
Massimo, any plans to resurrect your patch? :) This seems to be still in demand by users.
Created attachment 302410 [details] [review] work in progress Attached is the latest version I have in a branch here rebased on top of master. I naively added the stroke-options-dialog widgets to the text tool options and implemented the rendering, saving, presetting etc. The stroked path is clipped to the text-path otherwise the ink-extents used to size the layer would clip the drawings. It requires clean up and decisions on what/how to expose to the user. Feel free to improve/ignore it, I'm not going to play with it in the next weeks as I'm busy.
Created attachment 302411 [details] [review] work in progress that was not the latest, there was stashed code for stroking with a pattern. It prints two CRITICALS, but I have not time to investigate what's the issue
As a comment (I'm not a Gimp Developer) I review the code and saw that the Text object has a border value. This one has an integer, not sure if this border is the stroke that should be declared within the option tools. https://git.gnome.org/browse/gimp/tree/libgimp/gimptexttool_pdb.c#n226
(In reply to Alexandro Colorado from comment #24) > As a comment (I'm not a Gimp Developer) I review the code and saw that the > Text object has a border value. This one has an integer, not sure if this > border is the stroke that should be declared within the option tools. > > https://git.gnome.org/browse/gimp/tree/libgimp/gimptexttool_pdb.c#n226 I think that border is to enlarge the size of the layer with respect to its minimal ink-extents. It is used here: https://git.gnome.org/browse/gimp/tree/app/text/gimptextlayout.c#n651
Created attachment 302682 [details] [review] work in progress Ok the previous patch did not save the pattern-name to the xcf text-layer parasite, this one does it. And the CRITICALS were when stroking with a pattern but none was selected in the tool options dialog.
Comment on attachment 302682 [details] [review] work in progress per patch description
-- 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/35.