FontForge is a great tool for converting fonts. I needed to convert a lot of OpenType fonts to TrueType or Type 1 format to use them with Apache FOP, as FOP doesn't yet support OpenType fonts with CFF glyph formats. Doing the conversion in one FontForge script didn't work well, because (a) it leaked memory until it got OOM-killed and (b) it only used one CPU. So I wrote a helper shell script to control the job - posted here in case anyone else needs it later.
- Runs multiple FontForge processes ($CPUS) for faster conversion;
- Limits each FontForge process to converting 10 fonts before a new one is spawned, limiting memory leaks while avoiding too much launch overhead
- Filters the conversion log to eliminate messages I'm not so interested in seeing. You can tune the filter (awk script) to your taste.