[PD] cross platforms issues with displaying fonts in vanilla but not in Purr Data

Lucas Cordiviola lucarda27 at hotmail.com
Mon Feb 13 13:15:35 CET 2017


This chunk of code has to be placed on “pd-gui.tcl” @line 433?

////////////////

    critcl::cproc AddFontResource {Tcl_Interp* interp Tcl_Obj* pathObj} ok {
        Tcl_DString ds;
        Tcl_Encoding unicode;
        int len, r = TCL_OK;
        const char *path = Tcl_GetStringFromObj(pathObj, &len);

        Tcl_DStringInit(&ds);
        unicode = Tcl_GetEncoding(interp, "unicode");
        Tcl_UtfToExternalDString(unicode, path, len, &ds);
        if (AddFontResourceExW(Tcl_DStringValue(&ds), FR_PRIVATE, NULL)
== 0) {
            r = TCL_ERROR;
        }
        Tcl_DStringFree(&ds);
        Tcl_FreeEncoding(unicode);
        return r;
    }

//////////////////////////

 Of course needs a path to the .ttf and other tweaks right?



Mensaje telepatico asistido por maquinas.


________________________________
From: Pd-list <pd-list-bounces at lists.iem.at> on behalf of Lucas Cordiviola <lucarda27 at hotmail.com>
Sent: Monday, February 13, 2017 10:29 AM
To: Alexandre Torres Porres; Dan Wilcox; Jonathan Wilkes; Pd-List
Subject: Re: [PD] cross platforms issues with displaying fonts in vanilla but not in Purr Data



<http://%20https://msdn.microsoft.com/en-us/library/windows/desktop/ms533820(v=vs.85).aspx>
<http://%20https://msdn.microsoft.com/en-us/library/windows/desktop/ms533820(v=vs.85).aspx>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


>>@Dan:


>>The Tcl thing is just for Windows?


>Yes as it’s using the Window’s API.


What can I do to test if this work?

Put the tcl code where?

Can you guide me?

Or IOhannes?



Mensaje telepatico asistido por maquinas.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20170213/bd08f900/attachment.html>


More information about the Pd-list mailing list