Hacker News new | ask | show | jobs
by pdkl95 3410 days ago
> Notice there’s a lot of pixels here that don’t map to any segments, 30% that will never be displayed.

Unfortunately this problem, the slant (italic) added by the hardware, and the bias introduced from mapping the horizontal lines (A, G) to the "left" pixels only, causes artifacts in the output. A good example is the left side of this[1] image, where the bottom of the 7-seg displaying "F" has a large jump rightward to the "1" below it.

To get around these problems, aalib[2] renders each glyph that it will use, and for each block of pixels to display calculates nearest glyph. This automatically provides anti-aliasing for any shape glyph. As you already have the error (remaining distance to nearest glyph) for each group of pixels, it is also easy to add dithering to distribute the error across the image.

[1] http://i1.wp.com/www.plingboot.com/wp-content/uploads/2017/0...

[2] http://aa-project.sourceforge.net/aalib/