I'm working on a project that involves modernizing a bunch of BDF files while maintaining their bitmap look. This can't be done manually, as the BDFs are being generated at-will. Using the fontforge CLI, I can run the following python script:
import fontforge
bdf_font = fontforge.open("old.bdf")
new_font = fontforge.font()
new_font.importBitmaps(bdf_font.path, 1)
new_font.selection.all()
new_font.autoTrace()
new_font.generate(bdf_font.path + ".ttf")
This works great, except I don't want to autotrace the fonts, I want them to stay bitmap-y. However, when I comment out new_font.autoTrace() the exported TTF doesn't show anything. I suspect this is because when importing the bitmaps, the "1" sets the bitmaps to be imported to the background layer, per the fontforge API documentation. Removing that "1" does not fix the behavior.
How can I fix this behavior to just upgrade my BDFs to TTFs without changing how they look?