Blurry text rendering problem (aliasing)

Talk about Pixelmator Pro, share tips & tricks, tutorials, and other resources.
User avatar

2019-04-25 08:13:55

Text layers gets rendered blurry and designs are looking ugly.

Here is an example:

Image

How to fix it?
User avatar

2019-04-25 08:19:44

Event 48px font-size looks pixelated.

Image

On some forums, they told, that Pixelmator using native macOS text rendering feature.
This is strange conclusion, because small text in macOS UI or web pages looks very smooth on MacBook Pro Retina display.

Maybe, I'm missing some preferences?
User avatar

2019-04-25 10:25:32

"Even 48px looks pixelated."
You do realise how that sounds? If you set text to 48 pixels high, you're going to see the pixels... because there are 48 of them.

If you don't want to see pixels, design to avoid them. Use enough resolution that you don't see them any more.

If you need to use fonts at a low pixel-size, you can use a font designed for the purpose, often called a bitmap font (although you have to use these at specific sizes to avoid the pixels themselves anti-aliasing).

Hope this helps.

- Stef.
User avatar

2019-04-25 11:29:16

Text on a webpage or text in a word processor like Pages is not the same as text in a bitmap (a.k.a. raster) image. On webpages and in word processors, text is a vector element, meaning it exists as a separate unit and it can be selected, resized or rendered at any size.

We could render text the same way in Pixelmator Pro but that would be a terrible idea because you will most often export images in a raster format like JPEG or PNG. These formats are made up of pixels and pixels only. There are no layers within them, it's just a map of individual pixels (which is where the word bitmap comes from). So the image is fundamentally made up of those small squares and any text within it is not going be text that you can select, copy, and edit. It's going to, essentially, be an image of some text.

For that reason, if you have a low-res image (say 600x400) and you add some text to it, there's not a whole load of pixels that can be used to draw the text. The same applies if you add some very small text to an image and view it zoomed in. This all works the same way in all raster image editing apps and simply reflects the reality of designing for raster formats.

Another very important thing to keep in mind is that, when designing for Retina and any other high-DPI displays, you need to create both 1x and 2x versions of your images. If you're planning to display an image at 600x400, you'll need a 1200x800 version of it for Retina. If you're working with raster elements within your designs, it makes more sense to work at 1200x800 and use that as your 2x, then export a 0.5x version to use as your 1x.
User avatar

2019-04-26 11:35:35

by st3f "Even 48px looks pixelated."
You do realise how that sounds? If you set text to 48 pixels high, you're going to see the pixels... because there are 48 of them.
Figured it out with "Exporting for web" feature and setting scale multiplier.

But…
by st3f Use enough resolution that you don't see them any more.
This is inconvenient to use, because I need to manually calculate, what font-size to set, depending on current canvas resolution, to make it look smooth.
In web pages visible size of font is unified across different pixel densities of screens.
For example, when I'm setting size of font to 14px, It will have same visual sizes in retina and non-retina displays.
In Pixelmator Pro I need to calculate every time the font size, to make it look smoothly and visually of desired size, for example 14px × 2 = 28px.
And when I have many elements, like panels, borders etc. I loose myself in math calculations…

So, following "features" in Pixelmator Pro seems for me inconvenient:

1. When I'm creating a document, I can choose PPI. But, It does not affects rendered canvas.
Collage of screenshots for demonstration is below.
Image
So, what this feature is for, when visually, rendered canvas size is the same and I can "Export for web" later at any resolution multiplier?

2. Text is rendered in raster mode, rather than vector.
In Adobe XD, for example, text is rendered in vector and it's smooth and I don't need to multiply everything ×2 to make it looking good. It looks good out of the box, when I'm working with documents.
Final resolution of exported images will be set at final stage of a process when I will use "Export for web" feature.
So, why not to render text in best possible quality?
I will not do math for every element and text will be smooth, while I'm working with it.
User avatar

2019-04-26 12:37:42

by AntonAL 2019-04-25 21:00:00 1. When I'm creating a document, I can choose PPI. But, It does not affects rendered canvas.
So, what this feature is for, when visually, rendered canvas size is the same and I can "Export for web" at any resolution multiplier later?
Couple of important things to note here:

1. No matter which unit you use to set the size of a new image, all Pixelmator Pro compositions are fundamentally made up of pixels — the canvas/image is rendered using pixels because the final products created using the app are assumed to be raster images.

2. PPI means pixels per inch. On a digital screen, PPI has no effect on how images are displayed because, in every screen, there is a set number of pixels and one image pixel is rendered in one screen pixel at 100% zoom. There are some caveats to this, but I think that's a good way to imagine it.

3. PPI is only relevant for print. Because when you print, paper doesn't have pixels that can be filled in. So to define the 'size' of a pixel, you can say "let 72 pixels be printed in one inch of paper" (by setting the PPI at 72) and the printer will know to print the image at that scale.

4. If you set the size of an image in a physical unit (inches/cm/mm), PPI is important because it determines the pixel size of the image. This is so that you don't have to calculate it yourself. Say, you need to create an image to be printed on 6x4 inch paper — to make sure it looks good, you need to print it at 300 PPI. As mentioned previously, Pixelmator Pro documents are pixel-based, so the image will fundamentally be sized in pixels. When you set the width and height at 6 and 4 inches and the PPI at 300, the image is actually created to be 1800x1200 pixels.

5. If you set the size of an image in pixels — like you have done — PPI has no effect on the actual fundamental pixel size of the image because you're already explicitly telling Pixelmator Pro what size you need. The only effect it has is on the print size, because if you say that you want the image to be 1800x1200 pixels and the PPI to be 300, naturally, the print size will be 6x4 inches (1800 pixels divided by 300 PPI is 6 and 1200 pixels divided by 300 PPI is 4).

I realize that this probably seems really super complicated and confusing. And it is, it took me a while to get my head around everything. But this isn't a system we invented, this is simply the standard for raster image editors like Pixelmator Pro, Pixelmator, Photoshop, and others.
by AntonAL 2019-04-25 21:00:00 2. Text is rendered in raster mode, rather than vector.
In Adobe XD, for example, text is rendered in vector and I's smooth and I don't need to multiply everything ×2 to make it looking good. It looks good out of the box.
Final resolution of exported images i will decide at final stage of a process when I will use "Export for web" feature.
So, why not to render text in best possible quality?
I will not do math for every element and text will smooth, when I'm working with them.
The first sentence on Wikipedia about Adobe XD is:

>Adobe XD is a vector-based tool...

The final products created in Adobe XD are most often not raster images but mobile apps and webpages. In these environments, text exists as a separate, live element, not as part of a flat, one-layer image. Pixelmator Pro wasn't designed quite with this purpose in mind — neither was, for example, Photoshop. That's not to say that these apps can't be used for app and web design, it's just not the use-case for which they're optimized. In our case, if we didn't render text within its pixel context, it would be very easy for images during the editing stage to be different from exported images.

We want what you see in Pixelmator Pro to be 100% consistent with what you see when you export. Plus, when you're working only or primarily with vector elements which can be resized whenever without losing quality, the pixel preview becomes less important, which is why it makes sense for applications like Adobe XD to not render pixels but doesn't make quite as much sense for apps like Pixelmator Pro to not do so.

I do understand that if you're working on a web design, 48 px text is not rendered the same on a page as it is within an image. For one, you don't have to worry about Retina and non-Retina, the web rendering engine takes care of that. There's also no pixelation. That's not true for raster images and that's kind of why these different apps exist. Having said all that, potentially, in a future update, we could add an option to always render text and shapes as vector but these decisions have to be taken with a wider plan in mind. Maybe if we created some sort of 'app/web design mode', it would make sense. But it's not a simple thing to do.
User avatar

2019-04-26 14:12:57

by Andrius 2019-04-26 12:37:42 Pixelmator Pro wasn't designed quite with this purpose in mind
Got it, thank You.
by Andrius 2019-04-26 12:37:42 we could add an option to always render text and shapes as vector.
Yes, It would be useful for me.
by Andrius 2019-04-26 12:37:42 But it's not a simple thing to do.
Never programmed under macOS.
Are you using native macOS text rendering API?
Does it not a matter of `renderText('Lorem ipsum', vector: true)`?
User avatar

2019-04-29 11:17:58

by AntonAL 2019-04-26 14:12:57 Never programmed under macOS.
Are you using native macOS text rendering API?
Does it not a matter of `renderText('Lorem ipsum', vector: true)`?


Well, the actual process of getting the text to render without the pixel preview wouldn't be the hardest part, but with features like this, the hardest things are probably finding a place for the option in the app, making sure that it doesn't clutter the interface or confuse people, that this feature doesn't cause stability issues, is compatible with legacy files, etc. etc.

And yes, we're using native macOS APIs for text.
User avatar

2019-04-29 12:30:51

by Andrius 2019-04-29 11:17:58 that this feature doesn't cause stability issues, is compatible with legacy files, etc. etc.
Yes, understand.
by Andrius 2019-04-29 11:17:58 making sure that it doesn't clutter the interface or confuse people
Here, for example.
Image
User avatar

2019-04-29 13:02:19

Oh, and also, our entire internal rendering architecture is pixel-based — the color adjustments, effects, layer blending, etc., so the text would then have to bypass this, which would break lots of things. So it turns out that it would probably be easier to rewrite the entirety of Pixelmator Pro from scratch than to stop rendering text with the pixel preview.