blog:071116_no_nimbus_for_mathematica

We had Mathematica 6 (6.0.1 to be specific) installed on a Debian 4.1 (Lenny/Testing). After setting up an xfs X font server and adding Mathematica's fonts everything seemed to work just fine. But then I remembered that I needed to add the FontPath to the VNCserver scripts. And when I tried to run Mathematica it greeted me with a nice beep and Help → Why the Beep? told me

Unable to find font family Nimbus Sans L with requested face (weight Plain, slant Plain). Substituting closest match.

Well, I hope that if anyone else gets the same message they can find my solution. Because when I searched the web I didn't find a bit. It took me more than an hour to cure this.

I first thought that some fonts were missing but this did not quieten Mathematica. After much reading and nearly getting lost in trial and error I found a (wrong) hint in an old documentation for Mathematica 4.2. Anyway, this hint pointed me to the file

`/usr/local/Mathematica/6.0/SystemFiles/FrontEnd/TextResources/X/Specific.tr`

So, by chance, there I found the entry for

@@resource NormalFontWeights { "medium", "normal", "light", "book"}

and I remembered from the fc-list output of

fc-list | grep -i "nimbus sans"

that there was no "normal" or "medium". There was only "regular". Thus,
adding `"regular"`

to the list of `NormalFontWeights`

as in

@@resource NormalFontWeights { "regular", "medium", "normal", "light", "book"}

fixed the problem :-)

Maybe I should add that when I tested some more configurations I once was facing the following error message which is – strangely enough – very similar though I was only starting the same Mathematica just by means of `ssh -X`

within the VNC server of another machine:

Unable to find font with family Nimbus Sans L, weight Plain, slant Plain, and size 10.

In this case `fc-list | grep -i "nimbus sans"`

still showed the same hits but

xlsfonts | grep -i nimbus

was empty because the `FontPath`

for the VNCserver session was not set.

blog/071116_no_nimbus_for_mathematica.txt · Last modified: 2007-11-16 21:20 by andreas

## Discussion

Just installed Mathematica 7.0.1, same issue, same fix. At least.

Mathematica 7 on Ubuntu 12.04. Same issue and this fix worked. Thank you very much for figuring this out AND for taking the time to post it online!

@David: I am glad you found this old posting and that it helped. Strangely enough, I haven't had this problem since years, however we are using Mathematica 8!?

Are you using VNC and/or xfs, or are you running Mathematica locally?