Convert TrueType glyphs to PNG image?

Prof. Falken picture Prof. Falken · Jun 17, 2013 · Viewed 11.2k times · Source

Is there a command line tool to convert glyphs from a TTF file, to PNG (or some other bitmap image format)?

If there is no ready command line tool for that, how would you go about doing it from one of C++, Perl, Python or Ruby or something easily found on an Ubuntu box?

Answer

imcaspar picture imcaspar · Jul 15, 2014

probably partly duplicate of How can I convert TTF glyphs to .png files on the Mac for free?

imagemagick can fulfill this kind of requests, should works fine on Mac/Linux/Windows. :-)

convert -background none -fill black -font font.ttf -pointsize 300 label:"Z" z.png

if a batch convert is needed, maybe you can consider use a little ruby script called ttf2png .