Ok,
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:
twapi package:
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.
Mensaje telepatico asistido por maquinas.
From: Dan Wilcox <danomatika@gmail.com>
Sent: Monday, February 13, 2017 5:06 AM
To: Lucas Cordiviola
Cc: Jonathan Wilkes; Alexandre Torres Porres; Pd-List; Miller Puckette
Subject: Re: [PD] cross platforms issues with displaying fonts in vanilla but not in Purr Data
>Another issue is that, for many, the rendering of a bolded DVSM will simply look *ulgy* to those used to a normal-weight Monaco, especially if they never used an earlier version of Pd or Pd on Linux.
IMO the default cross platform font should NOT be Bold. As Dan said OSX users will most likely find it ugly, and it was not bold in Pd-extended nor is in Purr-Data.
I tested with bold as that is the default font weight for vanilla on Linux AFAICT.
>>How difficult is to deploy DejaVu on Mac?
>Typically, add a key to the app bundle Info.plist and include the font in the app bundle's Resource folder. This means the font does not have to be installed system- or user- wide but only used by the app itself. This assumes Tk’s
handling of app bundles picks up on registered fonts from the plist (it should).
>As for Windows, it looks like it’s possible to load a font that comes with the app (the Windows API alls this a:
@Dan:
The Tcl thing is just for Windows?
Yes as it’s using the Window’s API.
No. See above.
I know the Mac solution. Deja Vu is usually installed on Linux systems and, if not, can be an install requirement by whatever package manager is being used. There is no need to distribute and install a copy of the font on Linux.