You are not logged in.

#1 2014-07-11 14:31:24

JKAbrams
Member
From: Sweden
Registered: 2011-11-07
Posts: 81

[SOLVED] Fontproblem in Mathematica 10.0.0, missing characters

I have some trouble rendering fonts in Mathematica 10.0.0 (AUR).
There are missing characters, see this example:
http://oi57.tinypic.com/2n80inl.jpg

Mathematica does not print any error message when run from a console (is there a way to make it print errors?).

Here is what Wolfram has to say about Fonts on Linux.

Any suggestions appreciated.

-----

Things I've tried so far:
* reinstalling
* clearing /~/.mathematica/
* installing/(uninstalling) font-mathematica (AUR)
* installing the ubuntu fonts
* messing with font-paths (see below)

Mathematica stores its fonts in /opt/Mathematica/SystemFiles/Fonts/, I tried adding the folders to the font-path even tho I'm thinking it should be able to find them anyway..

I added a xorg 10-fonts.conf:

cat /etc/X11/xorg.conf.d/10-fonts.conf 
# Let X.Org know about the custom font directories
Section "Files"
    FontPath    "/usr/share/fonts/100dpi"
    FontPath    "/usr/share/fonts/75dpi"
    FontPath    "/usr/share/fonts/Type1"
    FontPath    "/usr/share/fonts/100dpi"
    FontPath    "/usr/share/fonts/misc"
    FontPath    "/usr/share/fonts/TTF"
    FontPath    "/usr/share/fonts/OTF"
    FontPath    "/opt/Mathematica/SystemFiles/Fonts/Type1"
    FontPath    "/opt/Mathematica/SystemFiles/Fonts/AFM"
    FontPath    "/opt/Mathematica/SystemFiles/Fonts/SVG"
    FontPath    "/opt/Mathematica/SystemFiles/Fonts/TrueType"
EndSection

The font-path as reported by xset q:

xset q
...
Font Path:
  /usr/share/fonts/100dpi,/usr/share/fonts/75dpi,/usr/share/fonts/Type1,/usr/share/fonts/100dpi,/usr/share/fonts/misc,/usr/share/fonts/TTF,/usr/share/fonts/OTF,/opt/Mathematica/SystemFiles/Fonts/Type1,/opt/Mathematica/SystemFiles/Fonts/AFM,/opt/Mathematica/SystemFiles/Fonts/SVG,/opt/Mathematica/SystemFiles/Fonts/TrueType,/usr/share/fonts/misc/,/usr/share/fonts/TTF/,/usr/share/fonts/OTF/,/usr/share/fonts/Type1/,/usr/share/fonts/100dpi/,/usr/share/fonts/75dpi/,built-ins
...

Now a few got doubled/tripled.. (how to fix this?)

The font-packages I have installed are:

ttf-bitstream-vera
ttf-dejavu
ttf-freefont
ttf-junicode
ttf-liberation
ttf-ms-fonts (AUR)
ttf-symbola
ttf-ubuntu-font-family
jsmath-fonts
terminus-font

Output of fc-list (reorderd for readability):
http://pastebin.com/Z1qazs1s

Upon checking Xorg.0.log I found a few font-related errors:

grep /fonts /var/log/Xorg.0.log
[     4.834] (WW) The directory "/usr/share/fonts/OTF/" does not exist.
[     4.836] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[     4.836]    (Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
[     4.836] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[     4.836]    (Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
        /usr/share/fonts/misc/,
        /usr/share/fonts/TTF/,
        /usr/share/fonts/Type1/

The folders /usr/share/fonts/100dpi/ and /usr/share/fonts/75dpi/ did not contain any fonts, only a file fonts.alias.

I created the missing OTF-folder and ran this anyway:

mkfontdir /usr/share/fonts/100dpi
mkfontdir /usr/share/fonts/75dpi
mkfontdir /usr/share/fonts/OTF

That silenced the warnings but did nothing re. my problems with Mathematica.

I also ran this:

mkfontdir opt/Mathematica/SystemFiles/Fonts/TrueType
mkfontdir /opt/Mathematica/SystemFiles/Fonts/Type1
mkfontdir /opt/Mathematica/SystemFiles/Fonts/SVG
mkfontdir /opt/Mathematica/SystemFiles/Fonts/AFM
fc-cache -vf

And also this:

xset fp+ /opt/Mathematica/SystemFiles/Fonts/Type1
xset fp+ /opt/Mathematica/SystemFiles/Fonts/SVG
xset fp+ /opt/Mathematica/SystemFiles/Fonts/AFM
xset fp rehash

But it wasn't helpful.

[BTW I don't understand what the difference is between xset and using xorg.conf.d? Is xset only runtime, or where does it store the configuration?]

(I'm probably going about this the wrong way, I'm new to fixing font issues...)

Last edited by JKAbrams (2014-07-12 19:30:23)

Offline

#2 2014-07-11 21:06:26

gh02t
Member
Registered: 2013-06-15
Posts: 11

Re: [SOLVED] Fontproblem in Mathematica 10.0.0, missing characters

I don't have much to offer in terms of help, but I'm having the same issues. I've tried everything you listed as well. Not sure where to look beyond that. Eclipse looks ok, so not a Java thing.

Mathematica uses some old style Type 1 fonts, maybe that has something to do with it? But it worked fine before, so it must have something to do with the new fonts with M10.

Are you running any custom font config packages like Infinality?

Edit to include a screencap... bad fonts

Last edited by gh02t (2014-07-11 21:49:28)

Offline

#3 2014-07-11 22:08:12

JKAbrams
Member
From: Sweden
Registered: 2011-11-07
Posts: 81

Re: [SOLVED] Fontproblem in Mathematica 10.0.0, missing characters

Are you running any custom font config packages like Infinality?

No, nothing fancy like that.

Did you use the AUR-package or did you install it straight from the .sh file?
I've only tried the AUR package for 10.

I did an installation of 9 the other day from the .sh file, which I then deleted manually (according to Wolfram to delete it you just have to delete the main folder), I wonder if something might have been left behind? (Yes I also deleted/~/.mathematica).

Offline

#4 2014-07-12 00:57:57

qft
Member
Registered: 2008-10-27
Posts: 23

Re: [SOLVED] Fontproblem in Mathematica 10.0.0, missing characters

I am having the same problem as well. Tried all the steps described above with no success. I'm sure I don't have anything left behind from Mathematica 9.

Also lsof shows many of the mathematica fonts such as "MathematicaSans.ttf" are in use whenever I run mathematica, however none of the special characters can be rendered correctly.

Offline

#5 2014-07-12 01:10:01

JKAbrams
Member
From: Sweden
Registered: 2011-11-07
Posts: 81

Re: [SOLVED] Fontproblem in Mathematica 10.0.0, missing characters

qft wrote:

I am having the same problem as well. Tried all the steps described above with no success. I'm sure I don't have anything left behind from Mathematica 9.

Good, then I can lay that worry to rest.

I wonder what the common factor is, because for other people it works (see the AUR comments).
What are the factors that affect font rendering?

Offline

#6 2014-07-12 01:59:29

clouds56
Member
Registered: 2014-07-12
Posts: 3

Re: [SOLVED] Fontproblem in Mathematica 10.0.0, missing characters

I have the same problem, and when I fallback to Mma 9, the font goes well.
but when I upgrade to 10, it is broken again

Last edited by clouds56 (2014-07-12 02:00:27)

Offline

#7 2014-07-12 03:32:03

qft
Member
Registered: 2008-10-27
Posts: 23

Re: [SOLVED] Fontproblem in Mathematica 10.0.0, missing characters

If you copy the file Mathematica.ttf to /usr/share/fonts/TTF/, and then select the Mathematica font in Libreoffice, all the special characters in Mathematica can show up in Libreoffice. However Mathematica cannot render these special characters in Mathematica.ttf.

Offline

#8 2014-07-12 19:05:29

JKAbrams
Member
From: Sweden
Registered: 2011-11-07
Posts: 81

Re: [SOLVED] Fontproblem in Mathematica 10.0.0, missing characters

Found a solution for KDE in this thread.

Change the Anti-aliasing-setting:

System Settings > Application Appearance > Fonts > Use anti-aliasing

My was set to System settings, I set it to Enabled and it started  working. I tried to change it back to System Settings but now I can't make it not work again.

Last edited by JKAbrams (2014-07-12 19:31:24)

Offline

#9 2014-07-12 20:44:06

qft
Member
Registered: 2008-10-27
Posts: 23

Re: [SOLVED] Fontproblem in Mathematica 10.0.0, missing characters

Thank you so much! It is indeed working now!

Offline

#10 2014-07-13 13:15:51

clouds56
Member
Registered: 2014-07-12
Posts: 3

Re: [SOLVED] Fontproblem in Mathematica 10.0.0, missing characters

That's great, works for me too!

Offline

#11 2014-07-13 22:30:09

gh02t
Member
Registered: 2013-06-15
Posts: 11

Re: [SOLVED] Fontproblem in Mathematica 10.0.0, missing characters

Hmm... for me anti-aliasing makes the fonts look better, but the special characters are still absent.

Last edited by gh02t (2014-07-13 22:30:21)

Offline

#12 2014-07-15 01:50:04

qft
Member
Registered: 2008-10-27
Posts: 23

Re: [SOLVED] Fontproblem in Mathematica 10.0.0, missing characters

gh02t wrote:

Hmm... for me anti-aliasing makes the fonts look better, but the special characters are still absent.

Have you tried delete ~/.config/Trolltech.conf?

Offline

#13 2014-07-15 20:20:37

gh02t
Member
Registered: 2013-06-15
Posts: 11

Re: [SOLVED] Fontproblem in Mathematica 10.0.0, missing characters

qft wrote:

Have you tried delete ~/.config/Trolltech.conf?

Wow, that made it work. Thanks!

Offline

Board footer

Powered by FluxBB