RSS/Atom feed Twitter
Site is read-only, email is disabled

Workaround for Styled Text?

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

5 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

Workaround for Styled Text? Sarah 22 Jun 23:28
  Workaround for Styled Text? Carol Spears 23 Jun 00:43
  Workaround for Styled Text? Sven Neumann 23 Jun 10:25
   Workaround for Styled Text? Sarah 23 Jun 17:31
    Workaround for Styled Text? Sven Neumann 27 Jun 10:18
Sarah
2006-06-22 23:28:10 UTC (almost 18 years ago)

Workaround for Styled Text?

Hi,

I noticed that the the text tool cannot create multi-styled text... and apparently several bugs and/or enhancement requests have been filed asking for this feature.

Is there an existing gimp feature I've missed that makes this easier to cope with? Or is there a recommended workaround? Is there, for instance, an easy way to put styled text into a text file and then convert it into an x by y image or layer with a script? And a way to change the text and re-render without too much manual labor?

The ideas I've had:

- Make an html document and take a screenshot - yuck, and labor intensive if many frequent text changes are needed.

- Code something myself - not horribly painful, but a simpler solution might be nice! :-)

Any better suggestions?

I'm using The Gimp 2.2.11 that came with Ubuntu 6.06.

Thanks,

Sarah

Carol Spears
2006-06-23 00:43:44 UTC (almost 18 years ago)

Workaround for Styled Text?

On Thu, Jun 22, 2006 at 02:28:10PM -0700, Sarah wrote:

I noticed that the the text tool cannot create multi-styled text... and apparently several bugs and/or enhancement requests have been filed asking for this feature.

when you ask for multi-styled text, what is it that you want?

GIMP does as much as a web browser does if you are talking about styled text in the same way that html styles it. if there is an italic font available, the browser will use it and so will gimp. neither the browser or gimp will make an italic font if one does not exist on the computer.

if you want fake styled fonts. like where the software slants them or makes them bold (and not how the font artist made the font) then the freetype plug-in should work for you.

http://freetype.gimp.org although, i have not checked to see if that was still there.

if you meant something else, please explain this.

carol

Sven Neumann
2006-06-23 10:25:31 UTC (almost 18 years ago)

Workaround for Styled Text?

Hi,

On Thu, 2006-06-22 at 14:28 -0700, Sarah wrote:

Is there an existing gimp feature I've missed that makes this easier to cope with?

Use the right tool for the job. Which would be a vector drawing application, such as Inkscape.

Sven

Sarah
2006-06-23 17:31:20 UTC (almost 18 years ago)

Workaround for Styled Text?

Ok, let me try again.

Suppose I want to put a bit of text into a GIMP document. I click on the text tool, then click on my document. I get a little window I can type my text into:

The quick brown fox jumps over the lazy dog.

I can choose a font, a size, a color, and some other attributes. Great!

Now suppose I want to type:

The *quick* brown fox jumps over the lazy dog.

Same as before, but this time, I want the word "quick" in bold. My first thought: look for an icon with a little B on it in the text editing box. There isn't one. Okay, try ctrl-b? Alt-b? Nope, no such luck. Check the documentation... hmm, the text tool *is* documented (yay!), but there's no mention of using two or more styles in the same piece of text. Check the bug, database...

http://bugzilla.gnome.org/show_bug.cgi?id=122706

Hmm, rotten luck... apparently it's not supported right now. Ok, I'll have to find a workaround.

Well, the simple solution, use multiple chunks of text. "The" as one layer, "quick" as a layer using a bold font, and "brown fox jumps over the lazy dog" as another layer. Ok, great, that gives me what I want...

... oh, wait. I want to change "quick" to "flatulent". Easy, just change the layer... oh, but now the words don't line up, because the word "flatulent" is wider than the word "quick"... Ok, tweak the layers a little bit to make the words line up... that's better.

Ok, all is well, the text is there... and now suppose we go on to create a large image, with a hundred layers (!), six of which contain little stories about our poor fox and his various difficulties.

Now we want to add another little chunk of text:

The *flatulent* brown fox jumped over the lazy dog, and into a fire,
causing quite a large explosion.

--- Goethe, "Treatise on Typewriter Testing", 1831 [1]

[1] Disclaimer: Goethe did not actually write this.

Hmm, ok, we can do this, except we want the word flatulent in bold, "Treatise on Typewriter Testing" needs to be in italic, and we'd really prefer [1] to be a superscript... ok, let's see, how many layers will that be... ok... click, click, click.... lots of layers. Whew, ok, but at least it's done.

... oh, wait. We want to change Goethe to Mark Twain, and we want to turn our *flatulent* brown fox into a *flatulent* fuscia ferret... and there are six different chunks of text mentioning the fox in different ways, each containing many layers, and we have to change them all...

Sigh... guess I'm not going home early today, huh? This workaround doesn't scale very well, does it?

Hmm, maybe I can use something else.

The first thing I tried was Inkscape... but I quickly discovered that it's text manipulation tools are about the same... sure I can do all sorts of fancy things with the text, turn it into a path and wrap it around a tree and whatnot, but I can't seem to put multiple styles of text into a single chunk. Workflow-wise, the problems are pretty much the same.

Another workaround would be to type the text into OpenOffice, or into an HTML document, and then take a screenshot, and open the screenshot, select the text, and paste it into a new layer in my document, but now, when I need to make changes, I have to repeat the whole process... very labor intensive. This workaround doesn't scale either.

Now, you could make the argument that what I *really* should do is use a different program, like Scribus, that's designed for page layout... the problem is, I'm *not* trying to do page layout, I'm trying to put just a couple of little chunks of text into a small, screen resolution bitmap image, and I only need bold, italic, and *maybe* subscript and superscript. I shouldn't need to use a sledgehammer to swat this fly... besides, I don't want to use another program, I want to use GIMP! It already does 99% of what I need, and I hate to have to change tools for that last 1%.

What I really want is to have the feature requested in bug 122706 to magically be implemented... but since the first request was back in 2003, I'm guessing that I shouldn't hold my breath.

My second choice would be some amazingly clever workaround that can not only generate multiple styles of text, but make it no more than moderately painful to change many small chunks of text multiple times. Maybe some command-line utility that can render an rtf or html document into an x-by-y pixel bitmap image...or maybe TeX? And then maybe some script-fu or python-fu to automate the updates?

In the absence of a clever workaround, I'll probably just write a chunk of Java code that can generate an image containing some text with simple styles in it, simply because I already have a chunk of code from another project that can do this, including alpha channel support, and it probably wouldn't take long to cobble something together.

But if there's a better way to do it, I'd love to hear!

Thanks for your time!

Sarah

Sven Neumann
2006-06-27 10:18:35 UTC (almost 18 years ago)

Workaround for Styled Text?

Hi,

On Fri, 2006-06-23 at 08:31 -0700, Sarah wrote:

In the absence of a clever workaround, I'll probably just write a chunk of Java code that can generate an image containing some text with simple styles in it, simply because I already have a chunk of code from another project that can do this, including alpha channel support, and it probably wouldn't take long to cobble something together.

Why don't you add the missing functionality to GIMP so that everyone can benefit from it instead of cobbling something together? If you need a helping hand with Pango and the text tool code, I can offer you one.

Sven