Dominik Kaaser portfolio, projects, and weblog

FontRenderer

14 August 2012

Earlier this month I published the tool „FontRenderer“ (see project’s page) on the Google Code platform, http://code.google.com/p/fontrenderer/.

FontRenderer converts a text to polygonal data in „.line“ format using the outline of a specified font. Feel free to download a copy at http://code.google.com/p/fontrenderer/downloads/. Note, that the actual output generated depends on the font file used, and thus the simplicity is neither guaranteed nor checked. So far I can tell that simplicity can be assumed for high-quality-fonts. Additionally, Binaries for Windows (32 Bit) are provided at above location.

Examples

The following command renders the text from standard input using the Liberation Sans Regular font,

./fontrenderer /usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf

producing the following output for the letter „L“:

7
0.17955986925821501576 0.00000000000000000000
0.17955986925821501576 0.99999999999999988898
0.31511714364130838373 0.99999999999999988898
0.31511714364130838373 0.11071733326679805698
0.82044013074178490097 0.11071733326679805698
0.82044013074178490097 0.00000000000000000000
0.17955986925821501576 0.00000000000000000000

© 2001–2018 Dominik S. Kaaser