Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fonts were being loaded in a way that would only work if the script was being called from the mw2pdf root (the folder containing the embedded fonts). This adds some (ugly) logic to identify the `__dirname` of the utility script and access fonts relative to the utility itself as opposed to the calling path. This logic is necessary because unfortunately NodeJS doesn't populate __dirname when module mode is enabled. See: https://stackoverflow.com/questions/32705219/nodejs-accessing-file-with-relative-path/32707530#32707530 As discussed in #24 we will eventually want to remove fonts from the project altogether, instead trying to have a generic default settings and allowing font configuration to be configurable for anybody who would like to override that generic option. Issue #24
- Loading branch information