在 GIMP 中如何在文本周围添加边框
GIMP
![](/data/attachment/album/202001/19/230506fzkyktqglfcyzkuh.jpg)


这个简单的教程介绍了在 [GIMP](https://www.gimp.org/) 中显示文本的轮廓的步骤。文本轮廓可以帮助你在其它颜色下高亮显示该文本。


![Outlined Text created in GIMP](/data/attachment/album/202001/19/230013erdd1bmr7c1ft1bs.png)


让我们看看如何在你的文本周围添加一个边框。


### 在 GIMP 中添加文本轮廓


整个过程可以用这些简单的步骤描述：


* 创建文本，并复制它的轮廓路径
* 添加一层新的透明层，并添加轮廓路径到透明层中
* 更改轮廓的大小，给它添加一种不同的颜色


这就是全部的东西。不用担心，我将使用适当地截图详细的展示每个步骤。按照这个教程，你应该能够为文本添加轮廓，即使你在此之前从未使用过 GIMP 。


仅需要确保你已经 [在 Linux 上安装 GIMP](https://itsfoss.com/gimp-2-10-release/)，或者也可以使用的其它任何操作系统。


这篇教程在 GIMP 2.10 版本下演示。


#### 步骤 1: 创建你的主要文本，并复制它的轮廓


打开 GIMP ，并通过转到 “菜单 -> 文件 -> 新建” 来创建一个新的文件。你应该可以使用 `Ctrl+N` 键盘快捷键。


![Create New File](/data/attachment/album/202001/19/230016sr0m18p2xv55xp5v.jpg)


你可以在这里选择画布的大小。你也可以选择要白色背景或一种透明背景。它在 “高级选项 -> 颜色” 配置文件下。


我选择默认的白色背景。它在以后能够更改。


现在从左边栏的工具箱中选择文本工具。


![Adding text in GIMP](/data/attachment/album/202001/19/230019r6dg2lz2ukgg2u22.jpg)


写你想要的文本。你可以根据你的选择以更改文本的字体、大小和对齐方式。我保持这篇文章的文本的默认左对齐。


我故意为文本选择一种浅色，以便难于阅读。在这篇教程中我将添加一个深色轮廓到这个浅色的文本。


![Text added in GIMP](/data/attachment/album/202001/19/230020n92jvyu2tytt8ana.jpg)


当你写完文本后，右键文本框并选择 “文本的路径” 。


![Right click on the text box and select ‘Path from Text’](/data/attachment/album/202001/19/230026xmgodo2u82jmbc29.jpg)


#### 步骤 2: 添加一个带有文本轮廓的透明层


现在，转到顶部菜单，转到“层”，并添加一个新层。


![Use Shift+Ctrl+N to add a new layer](/data/attachment/album/202001/19/230027ld5g2jgpggl5558l.jpg)


确保添加新层为透明的。你可以给它一个合适的名称，像“文本大纲”。单击确定来添加这个透明层。


![Add a transparent layer](/data/attachment/album/202001/19/230031kawgaaaarercsitt.jpg)


再次转到菜单，这次转到 “选择” ，并单击 “来自路径” 。你将看到你的文本应该被高亮显示。


![Go to Select and choose From Path](/data/attachment/album/202001/19/230032yxetlf9qrbruer6u.jpg)


总的来说，你只创建了一个透明层，它有像你的原文一样相同的文本（但是透明）。现在你需要做的是在这个层上增加文本的大小。


#### 步骤 3: 通过增加它的大小和更改它的颜色来添加文本轮廓


为此，再次在菜单中转到 “选择” ，这次选择 “增加”。这将允许增大透明层上的文本的大小。


![Grow the selection on the additional layer](/data/attachment/album/202001/19/230033mgvfd9qqzdm00qfh.jpg)


以 5 或 10 像素增加，或者你喜欢的任意像素。


![Grow it by 5 or 10 pixel](/data/attachment/album/202001/19/230034dl9717clelz7lrj7.jpg)


你选择需要做是使用一种你选择的颜色来填充这个扩大的选择区。因为我的原文是浅色，在这里我将为轮廓使用背景色。


如果尚未选择的话，先选择你的主图像层。这些层在右侧栏中可视。然后转到工具箱并选择油漆桶工具。为你的轮廓选择想要的颜色。


选择使用该工具来填充黑色到你的选择区。记住。你填充文本外部的轮廓，而不是文本本身。


![Fill the outline of the text with a different color](/data/attachment/album/202001/19/230035hughofowg88z7l0w.jpg)


在这里你完成了很多。使用 `Ctrl+Shift+A` 来取消你当前的选择区。


![Outline added to the text](/data/attachment/album/202001/19/230041m19wrrpviuy6v1tc.jpg)


如此，你现在已经在 GIMP 中成功地添加轮廓到你的文本。它是在白色背景中，如果你想要一个透明背景，只需要在右侧栏的图层菜单中删除背景层。


![Remove the white background layer if you want a transparent background](/data/attachment/album/202001/19/230043xw934zbf30zrqoaf.jpg)


如果你对结果感到满意，保存文件未 PNG 文件(来保留透明背景)，或你喜欢的任何文件格式。


### 你使它工作了吗？


就这样。这就是你在 GIMP 中为添加一个文本轮廓而需要做的全部工作。


我希望你发现这个 GIMP 教程有帮助。你可能想查看另一个 [关于在 GIMP 中添加一个水印的简单教程](https://itsfoss.com/add-watermark-gimp-linux/)。


如果你有问题或建议，请在下面自由留言。




---


via: <https://itsfoss.com/gimp-text-outline/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[robsean](https://github.com/robsean) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

This simple tutorial explains the steps to outline text in [GIMP](https://www.gimp.org/?ref=itsfoss.com). The text outline helps you highlight text against the background of other colors.

![Outlined Text created in GIMP](https://itsfoss.com/content/images/wordpress/2019/12/outlined_text_GIMP.png)

Let’s see how you can add a border around your text.

## Adding text outline in GIMP

The entire procedure can be described in these easy steps:

- Create your text and copy its outlined path
- Add a new transparent layer and add the outlined path to this layer
- Change the size of the outline, add a different color to it

That’s all. Don’t worry, I am going to show each steps in detail with proper screenshots. By following this tutorial, you should be able to add outline to text even if you never used GIMP before.

Just make sure that you have [GIMP installed on Linux](https://itsfoss.com/gimp-2-10-release/) or whatever operating system you are using.

This tutorial has been performed with GIMP 2.10 version.

### Step 1: Create your primary text and copy its outline

Open GIMP and create a new file by going to the top menu->File->New. You can also use Ctrl+N keyboard shortcut.

![Create Outline Text Gimp 1](https://itsfoss.com/content/images/wordpress/2019/12/create_outline_text_gimp_1.jpeg)

You can select the size of your canvas here. You may also choose if you want white background or a transparent background. It is under the Advanced Options->Color profile.

I have chosen the default white background. It can be changed later.

Now select the Text tool from the toolbox in the left sidebar.

![Outline Text Gimp 2](https://itsfoss.com/content/images/wordpress/2019/12/outline_text_gimp_2.jpg)

Write the text you want. You can change the font, size and alignment of the text as per your choice. I have kept the default left alignment of the text for this article.

I have deliberately chose a light color for the text so that it is difficult to read. I’ll add a darker outline to this light text in this tutorial.

![Adding text in GIMP](https://itsfoss.com/content/images/wordpress/2019/12/outline_text_gimp-3.jpg)

When you are done writing your text, right click the text box and select **Path from Text**.

![Process of adding outline to text in GIMP](https://itsfoss.com/content/images/wordpress/2019/12/outline_text_gimp_4.jpg)

### Step 2: Add a transparent layer with the text outline

Now, go to the top menu, go to Layer and add a new layer.

![Add a new layer in GIMP](https://itsfoss.com/content/images/wordpress/2019/12/outline_text_gimp_5.jpg)

Make sure to add the new layer as transparent. You can give it a suitable name like ‘outline for text’. Click OK to add this transparent layer.

![Adding a transparent layer in GIMP](https://itsfoss.com/content/images/wordpress/2019/12/outline_text_gimp_6.jpg)

Go to the menu again and this time go to **Select** and click **From path**. You’ll see that your text has been highlighted.

![Outline Text Gimp 7](https://itsfoss.com/content/images/wordpress/2019/12/outline_text_gimp_7.jpg)

Basically, you just created a transparent layer that has the same text (but transparent) as your original text. What you need to do now is to increase the size of the text on this layer.

### Step 3: Adding the text outline by increasing its size and changing its color

To do that, go to Select in menu once again and this time choose Grow. This will allow you to grow the size of the text on the transparent layer.

![Grow the size of the text on the additional layer in GIMP](https://itsfoss.com/content/images/wordpress/2019/12/outline_text_gimp_8.jpg)

Grow it by 5 or 10 pixel or whatever you prefer.

![Grow the size of the text on the additional layer in GIMP](https://itsfoss.com/content/images/wordpress/2019/12/outline_text_gimp_9.jpg)

What you need to do now is to fill this enlarged selection with a choice of your color. Since my original text is of light color, I am going to use back color for the outline here.

**Select your main image layer** if it’s not already selected. The layers are visible at the right sidebar. Then go to the toolbox and select the bucket fill tool. Select the desired color you want for the outline.

Now use the tool to fill black color to your selection. Mind that you fill the outer outline of the text, not the text itself.

![Fill the outline of the text with a different color](https://itsfoss.com/content/images/wordpress/2019/12/outline_text_gimp_10.jpg)

You are pretty much done here. Use Ctrl+Shift+A to de-select your current selection.

![Outline added to text in GIMP](https://itsfoss.com/content/images/wordpress/2019/12/outline_text_gimp_11.jpg)

So now you have successfully added outline to your text in GIMP. It is on white background and if you want a transparent background, just delete the background layer from the layer menu in the right sidebar.

![Outline Text Gimp 12](https://itsfoss.com/content/images/wordpress/2019/12/outline_text_gimp_12.jpg)

If you are happy with the result, save the file as PNG file (to keep transparent background) or whichever file format you prefer.

## Did you make it work?

That’s it. That’s all you need to do to add a text outline in GIMP.

I hope you find this GIMP tutorial helpful. You may want to check out another [simple tutorial about adding a watermark in GIMP](https://itsfoss.com/add-watermark-gimp-linux/) or [adding brushes in GIMP](https://itsfoss.com/add-brushes-gimp/).

If you have questions or suggestions, please feel free to leave a comment below.