Cool, good to know that in theory it works. I also found a related solution which uses a different extension do the same thing: http://wiki.tcl.tk/22262 <http://wiki.tcl.tk/22262>
However, I’d say that requiring a tcl/tk extension may not be the best overall solution since historically Pd has avoided requiring anything beyond the base tcl/tk. A possible best approach is take the example C code for the forum post and make a *tiny* custom extension that is built only on Windows and loaded by the tk gui in order to load the private font. I don’t think we can simply add the font loading code to the core itself since it’s a separate process from the gui. In any case, this is something I can look into after I put together a triple boot machine to test some things on different platforms, including the vanilla autotools build on win. > On Feb 13, 2017, at 10:43 AM, Lucas Cordiviola <[email protected]> wrote: > > Following Dan`s suggestion to ship & use a font without installing it, I came > to a very straight-forward method for w32. > > Tested & working. > > It uses a Tcl Windows API extension. (600KB) > > twapi web: > http://twapi.sourceforge.net/v4.1/installation.html > <http://twapi.sourceforge.net/v4.1/installation.html> > > twapi package: > https://sourceforge.net/projects/twapi/files/Current%20Releases/Tcl%20Windows%20API/twapi-4.1.27/ > > <https://sourceforge.net/projects/twapi/files/Current%20Releases/Tcl%20Windows%20API/twapi-4.1.27/> > > added lines on "pd-gui.tcl" @line 24: > > # adding dejavu fonts on mswindows > package require twapi > twapi::AddFontResourceEx DejaVuSansMono.ttf > twapi::AddFontResourceEx DejaVuSansMono-Bold.ttf > > 0000000 > > Don't know how to exclude this "package require" for the other OSs. > The .ttf were placed on pd/bin for simplicity. -------- Dan Wilcox @danomatika <http://twitter.com/danomatika> danomatika.com <http://danomatika.com/> robotcowboy.com <http://robotcowboy.com/>
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
