<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>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.<br>
</p>
<p>However, you can certainly ask Tcl/Tk to draw text using a
certain font. In fact, the IEM GUI objects do exactly this.</p>
<p>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
(<a class="moz-txt-link-freetext" href="https://github.com/pure-data/pdfontloader">https://github.com/pure-data/pdfontloader</a>) to load the bundled
Deja Vu Sans Mono font. However, it's specific to Windows (<span
class="pl-c1">AddFontResourceExW) and you would need to port it
to other systems. I'm not sure if it's even possible on macOS
and Linux</span>, you would have to do some research. But if it
works, you could just call <code>pdfontloader::load $path </code>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.<br>
</p>
<p>Christof<br>
</p>
<div class="moz-cite-prefix">On 15.02.2021 04:32, Alexandre Torres
Porres wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAEAsFmiO2bOUjtvbC5zB15GjGyzGiPH9KmSvoc-Smh_PFoUG5w@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">Em seg., 18 de jan. de 2021 às 17:45, IOhannes m
zmölnig <<a href="mailto:zmoelnig@iem.at"
moz-do-not-send="true">zmoelnig@iem.at</a>> escreveu:</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
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).<br>
</blockquote>
<div><br>
</div>
<div>Wow, This is huge for me. And I missed what this meant
when I first read it (don't read emails on summer vacation).
</div>
<div><br>
</div>
<div>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!</div>
<div><br>
</div>
<div>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!</div>
<div><br>
</div>
<div>I'll check on it and see if I can make any of it.</div>
<div><br>
</div>
<div>Cheers</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a class="moz-txt-link-freetext" href="https://lists.puredata.info/listinfo/pd-list">https://lists.puredata.info/listinfo/pd-list</a>
</pre>
</blockquote>
</body>
</html>