After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 102822 - Outlined text
Outlined text
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: Tools
git master
Other All
: Normal enhancement
: Future
Assigned To: GIMP Bugs
GIMP Bugs
: 125218 748350 (view as bug list)
Depends on:
Blocks: 136740
 
 
Reported: 2003-01-08 10:52 UTC by jkyro
Modified: 2018-05-24 10:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
outlined-text-patch (10.36 KB, patch)
2011-09-07 15:57 UTC, Massimo
none Details | Review
A sample outlined text layer (32.52 KB, image/x-xcf)
2011-09-07 15:59 UTC, Massimo
  Details
work in progress (24.23 KB, patch)
2015-04-27 04:35 UTC, Massimo
none Details | Review
work in progress (37.65 KB, patch)
2015-04-27 05:11 UTC, Massimo
none Details | Review
work in progress (45.32 KB, patch)
2015-04-30 16:49 UTC, Massimo
needs-work Details | Review

Description jkyro 2003-01-08 10:52:30 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?
Comment 1 Sven Neumann 2003-01-08 11:30:46 UTC
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.
Comment 2 Alan Horkan 2003-07-23 18:37:37 UTC
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.  
Comment 3 Jakub Steiner 2003-07-24 09:25:06 UTC
I know Sven is actually working on this for the 2.0 text tool. Marking
1.3.x
Comment 4 Sven Neumann 2003-08-17 17:02:40 UTC
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.
Comment 5 Sven Neumann 2003-10-22 16:10:07 UTC
*** Bug 125218 has been marked as a duplicate of this bug. ***
Comment 6 Sven Neumann 2003-10-22 16:12:10 UTC
With the new stroke API it should be so darn simple, it might even
make it into 2.0 still...
Comment 7 Sven Neumann 2003-10-29 23:36:21 UTC
The FreeType2 authors seem to be adding stroking to freetype as well
so perhaps it makes sense to use that for outlined text.
Comment 8 Sven Neumann 2004-10-22 13:51:09 UTC
This won't happen for 2.2, moving to the Future milestone.
Comment 9 weskaggs 2005-03-01 19:07:26 UTC
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?
Comment 10 Sven Neumann 2005-03-02 12:12:47 UTC
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.
Comment 11 jkyro 2005-03-02 12:27:11 UTC
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. 
Comment 12 Sven Neumann 2005-03-02 12:57:19 UTC
Preview? What preview?
Comment 13 weskaggs 2005-03-02 16:01:36 UTC
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.)
Comment 14 Eduardo Pérez Ureta 2005-12-04 17:00:42 UTC
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.
Comment 15 weskaggs 2005-12-04 17:50:07 UTC
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.
Comment 16 Sven Neumann 2005-12-05 17:58:24 UTC
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.
Comment 17 Massimo 2011-09-07 15:57:25 UTC
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.
Comment 18 Massimo 2011-09-07 15:59:56 UTC
Created attachment 195899 [details]
A sample outlined text layer

it is possible to open it with gimp-2.6 also.
Comment 19 Michael Natterer 2013-05-13 21:49:33 UTC
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?
Comment 20 Michael Natterer 2015-04-25 22:51:01 UTC
*** Bug 748350 has been marked as a duplicate of this bug. ***
Comment 21 Alexandre Prokoudine 2015-04-26 17:50:05 UTC
Massimo, any plans to resurrect your patch? :) This seems to be still in demand by users.
Comment 22 Massimo 2015-04-27 04:35:22 UTC
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.
Comment 23 Massimo 2015-04-27 05:11:37 UTC
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
Comment 24 Alexandro Colorado 2015-04-27 06:09:29 UTC
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
Comment 25 Massimo 2015-04-30 16:46:40 UTC
(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
Comment 26 Massimo 2015-04-30 16:49:31 UTC
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 27 Michael Schumacher 2017-02-19 14:14:35 UTC
Comment on attachment 302682 [details] [review]
work in progress

per patch description
Comment 28 GNOME Infrastructure Team 2018-05-24 10:49:09 UTC
-- 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.