cross-platform python font installer –
christoph fink  |  is a critical cartographer, urban social geographer and open source gis enthusiast

cross-platform python font installer

13 August 2015

For a QGIS python plugin for the advanced visualising of map data I need to make sure a certain font is available to the user. Amongst the users there will be non-technical staff, which is why adding a plugin repository URL is about as much as I can ask for. Thus, I searched for a way to install fonts from within the plugin. Not at all that difficult, as I quickly found out:

To use it in your python script simple from installfont import installfont and call installfont(path-to-font-file)

You can find the source code – released under the GPL – in my Bitbucket