Create an Inner Text Shadow in GIMP

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

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

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 Image Size to your requirements and select OK. When the document opens, select the Background color box to open the color picker. Set the color you wish for the background and select OK. Now go to Edit > Fill with BG Color to fill the background with the desired color. Now set the Foreground color to the color you want to use for the text the same way you changed the background. Select the Text Tool. Select the blank page and, in the GIMP Text Editor, type in the text you want to work with. 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. Go to Layer > Duplicate Layer. Right-click the new layer and select Discard Text Information to rasterize it. 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. Select the Move Tool from the Toolbox and select 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. Go to Select > None to remove the “marching ants” selection. 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 select 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 larger size text, use 3 pixels. When the amount is set, select OK. 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, select Selection before selecting 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.

GIMP vs. Photoshop

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.

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.

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.

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.

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.