Tutorial Request : Test Install/Uninstall a .ttf



  • Hi! I am wondering how to test install a .ttf -- and for Drawbot to install that .ttf only for the current drawing process, then uninstall it.

    i.e. a simple script/something like:

    install the font
    set the font style
    draw some text with that installed font
    uninstall the font

    If I am understanding correctly installFont(path) is for .otfs (?), and I should be using fontTools somehow in the script to set path, install/uninstall. I'm pretty new to all of this so I just have no clue how this should be written (and why that way) -- any help/insights would be greatly appreciated!



  • hello @loweredcase,

    you don’t really need to install a font in order to use it in a DrawBot script – you can simply pass the path to the font file to the font() command, like this:

    font('/myFolder/myFont.ttf')
    text('some text in my font', (x, y))
    

    cheers!


  • admin

    DrawBot uninstalls the font after the script is done, so its only accessible during run time of the script.

    There are some issues when reinstalling a font in the app itself where the postscript name is the still the same.



  • @gferreira i didn't know you could specifiy path inside font() command. thank you -- this is exactly what i needed!


Log in to reply