How to Add Inner Text Shadows in GIMP

A Quick Tutorial on How to Achieve This Effect

Create an Inner Text Shadow in GIMP

Inner text shadow in GIMP
Inner text shadow in GIMP.

Ian Pullen

There isn't a simple one-click option to add inner text shadow in GIMP, but in this tutorial, we'll show you how you can achieve this effect, which makes text appear as if it was cut out of the page.

Anyone used to working with Adobe Photoshop will know that inner text shadow is easily applied through the use of layer styles, but GIMP doesn't offer a comparable feature. To add an inner shadow to text in GIMP, you need to carry out a few distinct steps and this may seem a little complex to less advanced users.

However the process is relatively straightforward, so even new users of GIMP should have little difficulty following this tutorial. As well as achieving the overall goal of teaching you to add inner text shadow, in so doing you will also be introduced to using layers, layer masks and applying blur, one of the many default filter effects that ship with GIMP.

If you have a copy of GIMP installed, then you can get started with the tutorial.

Create the Text for the Effect

Create the text for the effect

Ian Pullen

The first step is to open a blank document and add some text to it.

Go to File > New and in the Create a New Image dialog box, set the size to your requirements and click OK. When the document opens, click the Background color box to open the color picker and set the color you wish for the background. Now go to Edit > Fill with BG Color to fill the background with the desired color.

Now set the Foreground color to the color for the text and select the Text Tool in the Toolbox. Click on the blank page and, in the GIMP Text Editor, type in the text you want to work with. You can use the controls in the Tool Options palette to change the font face and size.

Next, you will duplicate this layer and rasterize it to form the basis of the inner shadow.

Duplicate Text and Change Color

Duplicate text and change color in Gimp

Ian Pullen

The text layer produced in the last step can be duplicated, using the Layers palette, to form the basis of the inner text shadow.

In the Layers Palette, click on the text layer to ensure that it's selected and then go to Layer > Duplicate Layer or click the duplicate layer button at the bottom of the Layers palette. This places a copy of the first text layer on top of the document. Now, with the Text Tool selected, click the text on the document to select it – you should see a box appear that surrounds the text. With it selected, click on the Color box in the Text Options palette and set the color to black. When you click OK, you will see the text on the page change color to black. Finally, for this step, right-click the top text layer in the Layers palette and select Discard Text Information. This changes the text to a raster layer and you will no longer be able to edit the text.

Next, you can use the Alpha to Selection to subtract from the text layer to produce the pixels that will form the inner text shadow.

Move Shadow Layer and Use Alpha to Selection

Move shadow layer and use alpha to selection in Gimp

Ian Pullen

The upper text layer needs to be moved up and to the left by a few pixels so that it's offset from the text below.

Firstly select the Move Tool from the Toolbox and click on the black text on the page. You can now use the arrow keys on your keyboard to move the black text a little to the left and upwards. The actual amount that you move the layer will depend on what size your text is – the larger it is, the further you will need to move it. For example, if you're working on relatively small text, perhaps for a button on a web page, you may only want to move the text one pixel in each direction. Our example is a larger size to make the accompanying screen grabs a little clearer (though this technique is most effective at smaller sizes) and so we moved the black text two pixels in each direction.

Next, right-click the lower text layer in the Layers palette and select Alpha to Selection. You'll see an outline of 'marching ants' appear and if you click the upper text layer in the Layers palette and go to Edit > Clear, most of the black text will be deleted. Finally, go to Select > None to remove the "marching ants" selection.

The next step will use a Filter to blur the black pixels on the top layer and soften them to look more like a shadow.

Use Gaussian Blur to Blur the Shadow

Use gaussian blur to blur the shadow

Ian Pullen

In the last step, you produced small black outlines to the left and top of the text and these will form the inner text shadow.

Ensure that the upper layer in the Layers palette is selected and then go to Filters > Blur > Gaussian Blur. In the Gaussian Blur dialog that opens, ensure that the chain icon next to Blur Radius isn't broken (click it if it is) so that both of the input boxes change simultaneously. You can now click the up and down arrows beside the Horizontal and Vertical input boxes to change the amount of blur. The amount will vary depending on the size of the text that you're working on. For smaller text, a one-pixel blur may be sufficient, but for my larger size text, I used three pixels. When the amount is set, click OK.

The final step will make the blurred layer look like an inner text shadow.

Add a Layer Mask

Add a layer mask

Ian Pullen

Finally, you can make the blurred layer look like an inner text shadow using the Alpha to Selection feature and a Layer Mask.

If you're working on text that is a small size, you probably won't need to move the blurred layer, but as you're working on larger text, you can select the Move Tool and shift the layer down and to the right by one pixel in each direction. Now, right-click the lower text layer in the Layers palette and select Alpha to Selection. Next right click the top layer and select Add Layer Mask to open the Add Layer Mask dialog. In this dialog box, click on Selection before clicking Add.

This hides any of the blurred layer that falls outside of the borders of the text layer so that it gives the impression of being an inner text shadow.