brandon-rhodes / python-typesetting

A Python library letting you invoke TeX-inspired typesetting algorithms
https://www.youtube.com/watch?v=e7RVO0Sqr4s
158 stars 12 forks source link

KeyError because font 'Roman' is not known #5

Closed sawcordwell closed 8 years ago

sawcordwell commented 9 years ago

I am not sure what the reason is, perhaps because of different systems or because reportlab has changed, but I get a KeyError because of canvas.setFont('Roman', FONT_SIZE) at document.py line 26 and line 65 however canvas.setFont('Times-Roman', FONT_SIZE) works for me. Perhaps there should be some way to easily set the font from the API, or a way to detect which fonts are installed?

I am happy to work on this if it is something that would be useful.

brandon-rhodes commented 9 years ago

I like the idea that the font should be configurable, but it will be a few weeks before I can look at the code in any detail. Thanks for the idea, and I'll keep this issue open until I can address it!

brandon-rhodes commented 8 years ago

Thanks for the pull request! This is now a feature. Let me know if you have any further problems!