Show HN: TrueType Rasterizer

github.com

3 points by s_petrov 6 hours ago

Hi. I wrote a (relatively) small TrueType rasterizer. It's not very powerful at this point but it will be expanded with more features in the near future. It has the most needed features and i guess it might be useful to someone. It can properly visualize 99.9% (or something like that) of the western glyphs, no support for left-to-right writing systems for now. I've tested in on a dozen of fonts and it works quite well. It is very slow at this point, and this is the main area for improvement for the next release. Also, it cannot properly render glyphs with self-intersecting contours - fortunatelly such glyphs are very rare. This issue will be fixed soon i hope. Another thing is that the rendering of small-size glyphs (below 14-15px) is not that good (but it's decent) as the rasterizer does not support hinting. The next release, that will come in few months, will probably have gradient-colored glyphs/strings and pre-computed glyphs to improve the drawing performance drastically (among other smaller improvements). More information in the Github page. It is C++ only but conversion to C should be very easy and probably i'll do it when i have some free time.

chadcmulligan 5 hours ago

Very nice, its great to see a rasteriser thats in a couple of files, a lot easier to study.