Basic Pd oft info is in the /font/README.txt: https://github.com/pure-data/pure-data/tree/master/font https://github.com/pure-data/pure-data/tree/master/font
If someone compiles a list of useful fonts, we could also add them to the readme and/or a wiki page some where (if there isn't one already).
On Apr 5, 2019, at 5:46 PM, pd-list-request@lists.iem.at wrote:
Hi, dear list !
trying to get around PD in ubuntu linux and was curious if other fonts rather than "DejaVu Sans Mono" can be used or what i would have to do to make it work.
another question: what about LINUX fonts that have spaces in their names ? how can they be loaded for PD ? quotes don't seem to work !
i tried to launch PD under ubuntu 18 with the flag
-font-face "Bitstream Vera Sans Mono"
and received a serious Tcl/Tk error that i only could escape by killing PD and changing .pdsettings manually (i guess it said because of the quotes symbol - but forgot to write it down ...)
i'd like to try some classic fonts like courier or other mono fonts but so far none of them was accepted and "DejaVu Sans Mono" was loaded instead.
Not a big problem but i just wanted to know what experiences other linux users here have concerning using different fonts
thanks for any hints
best
oliver
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
Hi, Dan ! thanks for joining in !
On 2019-04-07 12:36, Dan Wilcox wrote:
Basic Pd oft info is in the /font/README.txt:
i found no such folder on a fresh PD installation on Linux.
the readme.txt on your linked github page also mentions the flag "-font-face" with an exmaple (-font-face "Zapf Dingbats") which, as i wrote, produces a crash on my system (Ubuntu LTS 18) because PD (or is it Tcl/Tk ?) can't interpret the quotes.
so far i didn't succeed in loading ANY font in PD, its name containing white spaces or not. so the fallback was always DVSM (not "Courier" as the readme says)
so, do you know where a linux PD searches for fonts ? do i have to create an extra folder containing them ?
and once more: how do i deal with fonts containing whitespaces ? can i just copy one and rename it with underscores ? if so, where would it have to be located in order to be found ?
thanks again for any ideas !
best
oliver
On 07/04/2019 12:38, oliver wrote:
the readme.txt on your linked github page also mentions the flag "-font-face" with an exmaple (-font-face "Zapf Dingbats") which, as i wrote, produces a crash on my system (Ubuntu LTS 18) because PD (or is it Tcl/Tk ?) can't interpret the quotes.
so far i didn't succeed in loading ANY font in PD, its name containing white spaces or not. so the fallback was always DVSM (not "Courier" as the readme says)
Dear Oliver
I am no expert, but after your first email, I played around a bit. I am on Ubuntu 18.10 running Pd 0.48.2, and I cannot reproduce your problem. I tried:
pd -font-face "Celeste Small"
Pd started OK, and Celeste Small was loaded as the default font (see screenshot — just a labelled canvas).
I tried disabling DejaVu Sans Mono (in Font Manager) and after disabling some DVSM alternates, I eventually got the Pd console message "WARNING: Font family 'DejaVu Sans Mono' not found, using default (courier)", so that really does seem to be the font of last resort.
If your system doesn’t have Courier installed — mine doesn’t — Pd will (it seems) load whatever alternate your fontconfig specifies (fc-match is your friend here), but it will still say it is using Courier. (The same goes for the alternate font choices, Helvetica & Times.)
Pd seems to rely on the OS to find fonts for it, so I don’t think you need to worry about search paths & creating extra folders. If you want to play around with renamed fonts, dropping them into ~/.local/share/fonts should be fine.
If your system does have a problem with whitespace or quotes, remember that you are giving -font-face the font’s name, not the font’s file name. You could edit the font info in a font editor (e.g. FontForge), but it would be easier to create an alias for the font you want to use and to drop the config into ~/.config/fontconfig/conf.d (see attachment 30-substitutions.conf, which is plain text).
Sorry I couldn’t be of more help, and good luck.
Yours
m
Dear Oliver
I am no expert, but after your first email, I played around a bit. I am on Ubuntu 18.10 running Pd 0.48.2, and I cannot reproduce your problem. I tried:
pd -font-face "Celeste Small"
Pd started OK, and Celeste Small was loaded as the default font (see screenshot — just a labelled canvas).
strange ... this is what happens on my system when i do this:
WARNING: Font family '"Celeste' not found, using default (DejaVu Sans Mono)
Small": can't open -font-size: can't open 12: can't open -font-weight: can't open normal: can't open (Tcl) UNHANDLED ERROR: extra characters after close-quote while executing "pdtk_startup_dialog .gfxstub5648e27e9080 0 "-font-face "C" ("uplevel" body line 7) invoked from within "uplevel #0 $docmds"
from that point on PD doesn't respond to anything anymore.
Tested on both PD 0.48 and PD 0.49
BTW: my system is: Ubuntu 19.04 (Disco Dingo) with an XFCE desktop
(but the same happened on a Ubuntu 18.04.2 LTS)
did you really use "normal" quotes ? i also tried escaping the whitespace with a backslash but no luck
Pd seems to rely on the OS to find fonts for it, so I don’t think you need to worry about search paths & creating extra folders. If you want to play around with renamed fonts, dropping them into ~/.local/share/fonts should be fine.
If your system does have a problem with whitespace or quotes, remember that you are giving -font-face the font’s name, not the font’s file name.
can you elaborate a little more ? what exactly is the difference ? PD seems to be looking for a "font family", at least this is what the warning on the console says ================================================= WARNING: Font family 'Courier_New' not found, using default (DejaVu Sans Mono) =================================================
BUT: what actually DID work was "-font-face FreeMono" - which looks similar to courier, so that will do for the moment.
all other methods you suggested (creating aliases, copying fonts to "~/.local/share/fonts" and renaming them, using any other "non-space" font) failed, though
anyway, thanks a lot for your suggestions, i already know more than before ;-)
oliver
On 07/04/2019 16:14, oliver wrote: WARNING: Font family '"Celeste' not found, using default (DejaVu Sans Mono)
Small": can't open -font-size: can't open 12: can't open -font-weight: can't open normal: can't open (Tcl) UNHANDLED ERROR: extra characters after close-quote while executing "pdtk_startup_dialog .gfxstub5648e27e9080 0 "-font-face "C" ("uplevel" body line 7) invoked from within "uplevel #0 $docmds"
from that point on PD doesn't respond to anything anymore.
Dear Oliver
I think you are right: it must be the parsing of the settings file. If I change the settings and then start with a simple "pd", I get the first part of the error, but not the Tcl error, and Pd seems to work fine. However, trying to go into the settings via the GUI — to remove the troublesome entry — did elicit the dreaded red Tcl error and locked things up.
I think I was hasty in my assumptions about how Pd finds fonts. If Pd fails over to asking for Courier, it will indeed load whatever font the name "Courier" is an alias for in fontconfig (possibly through a chain of aliases). However, aliases cannot be counted on to work in every other situation. (I had a lot more waffle here, but even I didn’t want to read it.)
Hacking the font metadata (e.g. in FontForge) so that the family name doesn’t contain spaces does work, but that is a ridiculously cumbersome solution.
Just as "pd -font-face "font name with spaces"" (yes, ordinary straight double quotes) works from the command line, it works in shell scripts, too, so that is probably the best bet for now, no?
Best
m
-- matthew brandi | 020 8882 4616
Dear Oliver
I am no expert, but after your first email, I played around a bit. I am on Ubuntu 18.10 running Pd 0.48.2, and I cannot reproduce your problem. I tried:
pd -font-face "Celeste Small"
hi, a small update !
your method actually works when i call PD from the command line like you suggested.
but when i write the -font-face flag with a font containing spaces into File/Preferences/Startup ... the formerly described errors occur
so, ".pdsettings" must be the bad guy here ...
anyway: thanks for leading me on the right track !
enjoying my courier ! ;-)
best
oliver