[PD] unicode symbols and Pd

Christof Ressi info at christofressi.com
Mon Feb 15 04:57:17 CET 2021

Or could just ask the user to install the fonts :-) It's a simple drag 
and drop after all...

On 15.02.2021 04:55, Christof Ressi wrote:
> It only works for GEM because it is actually responsible for drawing 
> text onto the screen (probably using the freetype library, but haven't 
> checked). The Pd core, on the other hand, doesn't do anything like 
> that, it just sends commands to the GUI.
> However, you can certainly ask Tcl/Tk to draw text using a certain 
> font. In fact, the IEM GUI objects do exactly this.
> The only remaining problem is that you want to use local fonts instead 
> of asking the user to install them. Actually, we already have the 
> pdfontloader Tcl extension (https://github.com/pure-data/pdfontloader) 
> to load the bundled Deja Vu Sans Mono font. However, it's specific to 
> Windows (AddFontResourceExW) and you would need to port it to other 
> systems. I'm not sure if it's even possible on macOS and Linux, you 
> would have to do some research. But if it works, you could just call 
> |pdfontloader::load $path |in your external with sys_vgui(). However, 
> the extension has to compiled against the correct Tk version, so 
> ideally it would be shipped with Pd. You could open a feature request.
> Christof
> On 15.02.2021 04:32, Alexandre Torres Porres wrote:
>> Em seg., 18 de jan. de 2021 às 17:45, IOhannes m zmölnig 
>> <zmoelnig at iem.at <mailto:zmoelnig at iem.at>> escreveu:
>>     there are of course exceptions to this: eg Gem handles the fonts
>>     on its own (using a library; I'm not crazy enough attempting to
>>     handle fonts myself).
>> Wow, This is huge for me. And I missed what this meant when I first 
>> read it (don't read emails on summer vacation).
>> So we can do this on the external level. I see it might be tricky and 
>> perhaps you can elaborate on the challenges please. It's just that 
>> once I was asking if we could do that for external (thinking about 
>> cyclone/comment then) and I got the idea that telling externals where 
>> to look for fonts is not possible, but I see now Gem allows us to do 
>> that!
>> This would really be great for something like this where you can ship 
>> a "music symbol" font and use an external like cyclone/comment to 
>> display cool symbolic musical thingies!
>> I'll check on it and see if I can make any of it.
>> Cheers
>> _______________________________________________
>> Pd-list at lists.iem.at  mailing list
>> UNSUBSCRIBE and account-management ->https://lists.puredata.info/listinfo/pd-list
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20210215/2518ee76/attachment.html>

More information about the Pd-list mailing list