4. Text and Fonts

Figure 8.33. Example of a text item

Example of a text item

Example of a text item, showing the boundary of the text layer. (Font: Utopia Bold)

The Text tool is progressively improved. One of the greatest improvements of GIMP 2.0 over GIMP 1.2 is in the handling of text. In GIMP 2.0 and 2.2, each text item goes in a separate Text layer, and you can come back later to the layer and edit the text in it. You can also move the text around in the image, or change the font, or the font size. You can use any font available on your system. You can control justification, indentation, and line spacing.

With GIMP-2.6, you can draw a bounding box (a rectangular frame) for the text on your image and you can adjust this rectangle in the same way as a rectangular selection. The text goes on being edited in the Text Editor, but it is automatically wrapped within this box.

Actually, you can operate on a text layer in the same ways as any other layer, but doing so often means giving up the ability to edit the text without losing the results of your work.

Figure 8.34. GIMP text editor

GIMP text editor

To understand some of the idiosyncrasies of text handling, it may help for you to realize that a text layer contains more information than the pixel data that you see: it also contains a representation of the text in a text-editor format. You can see this in the text-editor window that pops up while you are using the Text tool. Every time you alter the text, the image layer is redrawn to reflect your changes.

Now suppose you create a text layer, and then operate on it in some way that does not involve the Text tool: rotate it, for example. Suppose you then come back and try to edit it using the Text tool. As soon as you edit the text, the Text tool will redraw the layer, wiping out the results of the operations you performed in the meantime.

Because this danger is not obvious, the Text tool tries to protect you from it. If you operate on a text layer, and then later try to edit the text, a message pops up, warning you that your alterations will be undone, and giving you three options:

Figure 8.35. Warning lose modifications

Warning lose modifications