Fonts don't load properly when called by python
Created by: slifty
First things first: I don't love the way fonts are being used in this project to begin with here and it isn't clear to me we need them.
Anyway, right now the PdfGenerator
has a generatePdfFromScaffold
method where a bunch of fonts are registered in the PdfPrinter
object. The problem is is that the font paths break depending on where the script has been initiated from.
To make matters worse, __dirname
doesn't actually exist in our current setup (this may be fixed by #20). For now we need to do something like https://stackoverflow.com/a/32707530/159522 when defining the font paths in order to call the mw2pdf
script from our flask app.