Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

I have two layers. Layer one has the background image (some landscape) and layer two is colored. Layer two is above and I insert a text on top of layer two and merge it with layer two and then set text to transparent so I see the background layer.

The problem is the character edges are not sharp. Is there a way to get sharp edges for the text?

share|improve this question
    
Could you post a sample image showing the "not sharp" edges, (and ideally also a mock-up of what you want it to look like instead)? –  Ilmari Karonen Sep 16 '12 at 18:29

3 Answers 3

First off, I'd suggest not merging the text which should keep it sharper.

Other ideas:

  • Try not creating a new layer, but instead directly "write" onto the layer where the image is.
  • Try changing the blend mode which I'm guessing you are using on Layer 2 in order to let the background show through? and see if that improves things?
share|improve this answer

It's somewhat unclear what you mean by the text being "not sharp", so I'll give a variety of possible suggestions below. But first, just to set a baseline, here's some ordinary text in the GIMP (16px Sans, antialiased, no hinting, scaled up 2x):

Some text

This already looks pretty sharp to me, but here are a few things you could do to make it even sharper:

1. Enable hinting:

Hinting is a method of adjusting the shapes of characters so that their edges better align with pixel boundaries. You can enable hinting in GIMP by clicking the text layer, selecting the text tool and checking the "Hinting" checkbox in the tool options. (It's enabled by default, but you might have disabled it.)

There's also another checkbox, "Force auto-hinter", which controls the actual hinting method GIMP will use: with the box unchecked, GIMP will follow any custom hinting instructions embedded in the font, whereas checking the box makes GIMP use only its own generic font-independent hinting algorithm. Either hinting method should make the text look sharper, but the results of the two methods can be quite different, as shown below (normal hinting on left, auto-hinter on right):

Some text, normal hinting Some text, auto-hinting

In this particular case, the auto-hinter doesn't change the appearance much, although if you compare it side-to-side with the unhinted version, you can see some sharpening. The custom-hinted version, however, looks very different, with most line widths adjusted to be exactly one pixel wide.

Note that, with hinting enabled, changing the font size by even a small amount can have a major effect on the appearance of the text. This is particularly true for fonts with aggressive hinting at at small sizes — with the auto-hinter, the changes are usually less pronounced.

2. Disable anti-aliasing:

The text tool options dialog also has a checkbox for disabling anti-aliasing entirely, so that every pixel of the text is either fully opaque or fully transparent. In some sense, this yields maximum sharpness, but usually at the cost of smoothness. If you do decide to turn off anti-aliasing, I'd strongly recommend enabling hinting, as you can see below (normal hinting on left, auto-hinter in middle, no hinting on right):

Some text, normal hinting, no anti-aliasing Some text, auto-hinting, no anti-aliasing Some text, no hinting, no anti-aliasing

3. Add an outline:

Another possibility is that the "lack of sharpness" you describe is caused by the text blending in with the background, particularly if the background is "busy" or similar in color to the text, like in this example:

Some text, busy background

In that case, playing with hinting or anti-aliasing settings won't help, since the problem is lack of contrast between the text and the background. Instead, what you can do is surround the text with a high-contrast outline to separate it from the background. Here's one way to do it:

  1. Select the text layer, choose the text tool and click the "Path from Text" button at the bottom of the tool options dialog.
  2. Create a new transparent layer below the text layer and select it. (You can also draw the outline directly into the background layer, but using a separate layer is usually more convenient.)
  3. Select a foreground color that contrasts well with the text (e.g. white if the text is dark, black if the text is light).
  4. In the Paths dialog, select the previously created path and click the "Paint along the path" icon at the bottom. Make sure the "Stroke line" and "Solid color" options are selected and set the line width to a suitable value depending on the text size. (For example, I used 3 px below; remember that half of the outline width will be hidden behind the text.) The result should look something like this:

Some text, busy background, white outline

That's much more readable, isn't it? You can also tweak the outline in various ways, e.g. by blurring it:

Some text, busy background, blurred outline

or adjusting its opacity or, especially for a dark outline, moving the layer slightly to make it look like a drop shadow.

share|improve this answer

You possibly need to work in a higher resolution. If you set up your file to print/view at, say, 72 dpi (standard Internet image resolution), your text is going to be fuzzy for print work. Try working at a much higher resolution. This means your font size will be bigger and you'll view your work at less than 100%, but you'll have crisper edges to your text. You can zoom in to check more closely and you'll see that those pixel squares are much smaller. Also click off 'antialiased' in the text editor, and play around with the 'hinting'.

Now, if your work is intended for the Internet, it's still better to start at the higher resolution and resize the work once finished.

Hope that's helpful.

share|improve this answer
    
Hi Myrna, welcome to GDSE and thanks for your answer! If you have any questions about the site, please refer to the help center or ping one of us in chat once your reputation is sufficient (20). Keep contributing and enjoy the site! –  Vincent 2 days ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.