In the drawButtonText function in my LookAndFeel, I’m trying to draw the text slightly lower when the button is down, but no matter what I do, it seems like the smallest interval is an integer, not even when using the float version below. Doesn’t this draw on subpixel coordinates?
At low resolutions, most font renderers will snap text vertically so that the horizontal parts of the glyphs are pixel-aligned, because if you don’t do this, it’s really blurry. CoreGraphics does that, and so does the juce software renderer.
I’m not sure that it would be correct to say that CoreGraphics does this. For example, CoreGraphics text drawn to a CALayer can definitely be positioned at subpixel locations and, especially on a retina display, it’s not blurry at all. In JUCE, however, it seems that only the OpenGL renderer allows text to not be snapped to integer pixels.
I’ve no idea whether CoreGraphics also snaps when rendering to high-res displays or off-screen layers, but it definitely does look blurry at low resolutions unless you snap the horizontals. A lot of people criticised my font renderer for this until I added the feature!
No, the openGL renderer uses exactly the same font rasteriser as the software renderer, which always snaps vertically.
Would it be possible to snap to 0.5px instead of 1px verticals for retina displays? We have a object whose position animates very smoothly, and the snapping text during animation is very obvious and undesirable.