Aliasing problem


#1

Hi,

I’m having some issues with aliasing and line drawing since moving from juce 1.4 to juce 2, some examples below. The aliasing seems to be too strong resulting in some wispy effects on the text. Also on lines, when you draw a rounded rectangle, the corners end up a stronger color than the main lines.

Wispy effect

Top text is with old juce, bottom with latest. Same font size.

Notice the colour of the rounded corner


#2

That’s on a mac, right? It’s using CoreGraphics to draw the text (and shapes) now, so it’s Apple’s font and path rendering that you’re complaining about there.


#3

Ok, that would explain it, thanks Jules.


#4

Looks like sub-pixel rendering.
It’s taking into account the fact that the red green and blue components of each “pixel” are not in the same position,
meaning that the “pixel” zoom presented isn’t actually true to life.
(I’m guessing that as the previous is gray-scale and the new one seems “colorful”)

So there’s a good chance that the new result is actually better but it just looks weird when zoomed like this because the zoom doesn’t take into account “sub-pixel” locations.