简体   繁体   中英

Pure python cross-platform font renderer?

I'm looking for a pure Python font renderer. I don't need it to render to anything special, I just need the pixel colors/alpha. I'm using PIL right now, but I am not sure if it needs to hook into any system libraries that may not be installed.

Pyglet manages this, somehow, but I wasn't able to determine the relevant code. I am working on a gui for pyglet, so if I could use this, that would probably be even better.

Pyglet uses FreeType where available. I'd stick with that, even though it's not pure Python.

ReportLab can render to pixmaps:

http://www.reportlab.com/apis/reportlab/2.4/graphics.html#module-reportlab.graphics.renderPM

probably a bit heavyweight for your needs though.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM