I'm working on a typeface, and am looking at generating test-cases of how specific strings are rendered. What's the simplest way of automatically rasterising many different text-files into a bitmap?
MacOS – Rasterising text automatically
graphicsmacostext;
Best Answer
Add a html header with font selection (by mean of cp and >>) and then usewkhtmltoimage (https://wkhtmltopdf.org/) to generate images from that. Alternatively, look at the source code and write some 20 lines of Qt code using the same approach.
Proof of concept in PyQt5:
Result (png):
That, with custom distortion is how I actually created a large ML dataset for OCR from custom fonts.