Text Outline with GIMP


Published: 2015-11-14
Updated: 2015-11-25
Web: http://fritzthecat-blog.blogspot.com/2015/11/outlined-text-with-gimp.html


This is about creating a transparent outlined text image with the GIMP image editor, to appear in a video as overlay. Such a text over a video might not always be readable, as its color could dissolve in the video background. Thus I want to have a so-called "outline" on the text, that means there is a border around the letters, something like this:

I searched for GIMP tutorials about outlining text and started to try out what was described there, but I needed four of these tutorials until I was able to create what I needed. The problem is that GIMP is made by developers that prefer the technical approach, leaving out use-cases that a normal user would like to perform. Tutorials are similar, mostly pure technically, hard to understand by non-experts, and often incomplete.

But finally I melted together a solution that worked for me, and this article is my cheat-sheet for future text outlines. I am here referring to GIMP Version 2.8.10 on Ubuntu LINUX.

Abstract

What are we going to do, in technical terms?

A consequence of that procedure is that you can not change the text any more after outlining it.

Step by Step in Text

  1. Open GIMP and click "New" in the main menu. Choose the aimed pixel dimension of your image, then click "Advanced Options" and choose "Transparency" for "Fill with". Click "OK".

  2. Now select the text tool on the Toolbox window (the big "A" button) and mark a text area on the image by dragging the mouse from upper left to bottom right. You can write text when you click inside that area. To customize the font, select the text and make settings on the Toolbox window.

  3. Correct the typos in your text, you won't be able to change it after the outline has been added.

  4. Right-click within the text area to open the context-menu (popup-menu) and click the "Path from Text" item. Nothing visible happens by that action, just the shape of the text is copied into a GIMP buffer.

  5. In the main menu, click "Layer" - "New Layer". On the opening dialog, enter a name (e.g. "Outline") and choose "Transparency" for "Layer Fill Type". Click "OK" to create the layer that will carry the outline.

  6. In the main menu, click "Select" - "From Path". This copies the buffered "path" into the new layer. The text is now surrounded by a dashed animated border.

  7. Again in the main menu, click "Select" - "Grow" to increase the size of the border around the letters. A dialog opens, choose 5 pixels and click "OK". The outline is now visible, although still transparent.

  8. Once more in the main menu, click "Layer" - "Stack" - "Reverse Layer Order". This will swap the layers, and the outline will be below the text. This will have no visible effects, because the outline is still transparent.

  9. On the Toolbox, choose the inverse color to your text color. If your text is white, choose black. Then click "Edit" - "Fill with FG Color". The outline should be visible now.

  10. Click "Save As" in the main menu to save in GIMP format, or click "Export As" to save as .png image.

Step by Step in Screenshots

  1. Create a new transparent image with main menu "New".



  2. Choose a color and a font and write the text.



  3. Correct the typos in your text, you won't be able to change it after the outline has been added.

  4. Generate a "Path from Text" via context menu on the text area.



  5. Create a new layer in main menu "Layer" - "New Layer".



  6. Get the "Path" into that layer by main menu "Select" - "From Path".



  7. Widen the "Path" by main menu "Select" - "Grow".



  8. Swap the layers by main menu "Layer" - "Stack" - "Reverse Layer Order".



  9. Fill the "Path" with a color by main menu "Edit" -"Fill with FG Color".



  10. Save result, or "Export As" .png



I hope this article is helpful. At least for me it will be, when I create my next video.
Don't let yourself discourage by "Techno"-software!





ɔ⃝ Fritz Ritzberger, 2015-11-14