3 ms·
> if font rendering could be improved by using a Lanczos filter instead of a box filter You don't want an ideal filter for rendering fonts -- you want sharp ed
by vardump 10y ago
> if font rendering could be improved by using a Lanczos filter instead of a box filter
You don't want an ideal filter for rendering fonts -- you want sharp edges instead. A lot of work [1][2] has been done to achieve this.
In font rendering, alignment to pixel boundaries is intentional, it's called hinting. So you could say aliasing is used for an advantage.
[1]: https://en.wikipedia.org/wiki/Font_hinting https://en.wikipedia.org/wiki/Font_hinting
[2]: https://en.wikipedia.org/wiki/Subpixel_rendering https://en.wikipedia.org/wiki/Subpixel_rendering
- Ericson2314 10y agoI think on today's high density mobile phone screens, these techniques are no longer needed.
- wtallis 10y agoThey can still provide some benefit, but it's true that modern high-DPI mobile screens don't need the heavy-handed hinting of Windows and doing subpixel rendering when the subpixel orientation keeps changing as the device is rotated can be more trouble than it's worth.
- TheRealPomax 10y agoif those were the only screens in the world, I would agree wholeheartedly, but there are millions, if not more, non-mobile screens in use today. This problem is unlike to go away with high-dpi technology in the next 20 maybe even 50 years.
- Ericson2314 10y agoWell, a different render can be written for those screens. I assume 4K will come do predominate, but we'll see.
- Mathnerd314 10y ago> you want sharp edges instead It depends on your philosophy: https://blog.codinghorror.com/font-rendering-respecting-the-pixel-grid/ https://blog.codinghorror.com/font-rendering-respecting-the-... http://www.joelonsoftware.com/items/2007/06/12.html http://www.joelonsoftware.com/items/2007/06/12.html In general antialiasing and font hinting are at odds; you want one but not the other. With recent displays, the pixels are small enough that you can use anti-aliasing all the time, and no hinting: http://lh5.ggpht.com/-tsgwX-9fsRc/U6armqjI6QI/AAAAAAAAB9E/Bw_maJHnDIc/s1600-h/ppi-size-2%25255B9%25255D.png http://lh5.ggpht.com/-tsgwX-9fsRc/U6armqjI6QI/AAAAAAAAB9E/Bw... Subpixel rendering is just another anti-aliasing technique; it can be used on any bitmap. Of course, it's also true that the sinc filter is not the best possible. There's interesting research on shearlet transformations http://colorlab.no/content/download/46570/721686/file/2014_CIC22_PEDERSEN_PG37.pdf http://colorlab.no/content/download/46570/721686/file/2014_C... and other weird filters http://www.ansatt.hig.no/mariusp/publications/Pedersen2015_ICIP.pdf http://www.ansatt.hig.no/mariusp/publications/Pedersen2015_I.... Or just avoid the filtering stuff entirely and optimize a whole-eye model: http://michaelfrankdeering.com/blog/projects/eye_work/eye_model/ http://michaelfrankdeering.com/blog/projects/eye_work/eye_mo...