Preview area doesn't show Pixel Preview anymore

When “Pixel Preview” was activated, older versions used to show the pixelated glyphs also down in the preview area, but not anymore. Bug or feature?

BTW ist there a way to make the Pixel Preview show aliased glyphs, following the simple font rendering rules (pixel center inside the outline = pixel is filled)?

Thanks for the report. I fixed it.

I’ll see into the aliased drawing. Can you give me a good use case?

I could use it for a grid-based font to quickly check how it would render at a specific pixel size without any hinting, or that the pixels don’t change when tweaking the outlines.

I have already hacked up a quick plugin for that, but I thought maybe it would be easy enough to add the smoothing on/off switch to the existing pixel preview.

Bildschirmfoto 2024-04-16 um 09.50.34

1 Like

What algorithm do you use to do the pixelation?

I’m using NSBezierPath.containsPoint: for each pixel center. I haven’t yet checked if the result is realistic enough :wink:

I added Glyphs.defaults["PixelPreviewAntialias"] = False. But I would not bet my live on the result. It uses the antialiased image and applies a 50% threshold (with a custom core image kernel, very nerdy, even for me). Slight changes in gamma can result in pixels flipping.