howdy, I'll insist here as well, again, I like that we're looking in to how to install the same fonts for all platforms, but I'm really concerned about patches not looking the same in vanilla and in Extended/Purr Data.
what are the challenges in making it not only work well in cross platforms, but also in this different pd flavors?
cheers
2017-02-14 9:35 GMT-02:00 Lucas Cordiviola lucarda27@hotmail.com:
Ok, cool.
I add the previous code links here for us to remember:
https://msdn.microsoft.com/en-us/library/windows/desktop/ ms533820(v=vs.85).aspx
http://code.activestate.com/lists/tcl-core/8158/#sthash.qJEhQALT.dpuf http://code.activestate.com/lists/tcl-core/8158/#sthash.qJEhQALT.dpuf
Mensaje telepatico asistido por maquinas.
*From:* Dan Wilcox danomatika@gmail.com *Sent:* Monday, February 13, 2017 8:48 PM *To:* Lucas Cordiviola *Cc:* Miller Puckette; Pd-List *Subject:* Re: DejaVu Font: Shipping & using on W32
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
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 lucarda27@hotmail.com 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
twapi package: 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 robotcowboy.com
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/ listinfo/pd-list