Here is a prelim of what I had in mind: https://github.com/pure-data/pdloader

It's not currently working. It builds but can't find the Init function, so something is wrong with the dll export.

In any case, the idea is that this small lib can be built to match the Tcl version Pd is using.

In some ways, extrafont is basically the same idea but in this case, we only really need it on Windows. 

On Dec 15, 2017, at 4:57 PM, Lucas Cordiviola <lucarda27@hotmail.com> wrote:

It is working nicely both for -font-weight normal/bold.

Seems that the real font name gets auto-loaded.

But sure we can change it.


--

Mensaje telepatico asistido por maquinas.
On 12/15/2017 12:43 PM, Dan Wilcox wrote:
Note: I would stay name the font family "DejaVu Sans Mono" as the font detection mechanism and the postscript export expect that naming.

On Dec 15, 2017, at 4:34 PM, Lucas Cordiviola <lucarda27@hotmail.com> wrote:

Ok good.

Also I have another option (tested and working) with a brand new tcl pckg designed just for this need: “extrafont”

https://wiki.tcl.tk/48903

Is cross-platform but the win32 pkg is just 20KB.


This is added on pd-gui.tcl (line 364):


++++++++++++++++++++++++++++++++++++++++++++++++++
"win32" {
            # Adding dejavu fonts on mswindows
            catch { package require extrafont
           
            extrafont::load  pd/lib/font/DejaVuSansMono-Bold.ttf
            extrafont::isAvailable "DejaVu"   ;# true
            set myfontname "tk_dejavu"  ;#  ... choose the name you want ..
            set myfontname [font create -family "dejavu" -size 12]
            label .mylabel1 -font $myfontname
            #
            extrafont::load  pd/lib/font/DejaVuSansMono.ttf
            extrafont::isAvailable "DejaVu"   ;# true
            set myfontname "tk_dejavu"  ;#  ... choose the name you want ..
            set myfontname [font create -family "dejavu" -size 12]
            label .mylabel2 -font $myfontname
            }
            #


++++++++++++++++++++++++++++++++++++++++++++++++++++


Mensaje telepatico asistido por maquinas.
On 12/15/2017 11:41 AM, Dan Wilcox wrote:
No. The example in the link *uses* CRITCL but it's really just C code which could be built without using CRITCL.

I'm working on an example extension which loads the font. Should have it up relatively soon.

On Dec 14, 2017, at 6:23 PM, pd-list-request@lists.iem.at wrote:

Date: Thu, 14 Dec 2017 17:01:24 +0000
From: Lucas Cordiviola <lucarda27@hotmail.com>
To: "pd-list@lists.iem.at" <pd-list@lists.iem.at>
Subject: Re: [PD] Dejavu on ms-windows was: (Re: [PD-announce] Pd
0.48-1 test version released)
Message-ID:
<BLUPR01MB552D5ED48F32B4D2DCDE527A60A0@BLUPR01MB552.prod.exchangelabs.com>

Content-Type: text/plain; charset="windows-1252"

Doesn't this changed the dependency from TWAPI to CRITCL?







--------
Dan Wilcox
@danomatika
danomatika.com
robotcowboy.com