How to completely disable anti-aliasing?

How to completely disable anti-aliasing?
In lv_conf.h I have LV_ANTIALIAS set to zero but fonts are still being anti-aliased.
I use LVGL with indexed colors and font anti-aliasing is a show stopper since font edges look ugly.
I have tried generating a new font with bpp=1 but it did not help.
Please advise.

I don’t think it should be possible to generate a font with bpp=1 and still have antialiasing. @puzrin

That is what I would think but it appears some anti-aliasing still takes place, probably because LV_COLOR_DEPTH=8.

@embeddedt, @puzrin, @kisvegabor What seems to cause the problem (or at least make a difference) is Horizontal subpixel hinting option selected during the font conversion. With this option unchecked font looks good. Compare images below. Notice colors differ as well.
Is it a bug?

Subpixel hinting necessarily does something similar to antialiasing, so I don’t think it’s a bug. You should
just leave hinting off.

@embeddedt ic, it is a feature LV_ANTIALIAS setting does not turn off.
But still, why color does differ? On my test rainbow-256 indexed palette those colors are very closed to each other. When using RGB the difference probably is not so apparent but there should not be any.

I’m not familiar with the details of the hinting algorithm, but my guess would be that it was not designed/tested for 1bpp environments.

I think you are right, 1bpp (LV_COLOR_DEPTH=1) does not seem to be well tested and, in fact, I was unable to get it working. I am using custom palette with LV_COLOR_DEPTH=8. Maybe that explains something but not everything. Probably it would be safer to use palette based on rgb332 translated to rgb888. stm32f7 does not support rgb888 natively.

I have reported this as a bug.

1 Like

Antialiasing is for shapes. Fonts have different criteria of quality and different methods to tune. Those are not related anyhow.

If you use reduced palette in display’s buffer, disable subpixel smoothing.

1 Like