# Mathematica 10 Notebook Fonts Look Bad

Bug introduced in 10.0.0 and persisting through 10.3.0 or later

I've upgraded my home installation of Mathematica from version 9 to 10 today on a Windows 8.1 machine, and I'm getting a weird font issue - the fonts are not anti-aliased, and look unbalanced and weird. Just look:

For comparison, here what it looks on Linux with Mathematica V10

At this point you may object, as these issues are too minor to get worked up about. But neither I nor my otherwise benign OCD can work like this. Any ideas?

EDIT I've just had an idea, that maybe I need to manually remove old fonts leftover from the old Mathematica 9 installation. I've read somewhere that they were not going to pollute the main font catalog with symbol fonts in the next release, and maybe the new Mathematica is using old fonts for some reason. I can't test it right now myself, unfortunately.

• It is because you used UpperCaseFirstLetter. These are meant to be used by Mathematica only. Try it with lowerCaseFirstLetter as in foo[] instead of Foo[], it will look much better ! – Nasser Jul 16 '14 at 22:56
• Yeah, exactly. You don't even see what the hell I'm talking about; and it's driving me insane! It's not UpperCaseFirstLetter, though. Look at it, it's all messed up! Look at that equals sign. Why is one bar smaller than the other? – Gleno Jul 17 '14 at 0:24
• I don't have any fix, but thought I'd point out the M in "Halp Me plz!" is asymmetric too. – evanb Jul 17 '14 at 0:26
• I know I'm not helping, but that does look horrible – acl Jul 17 '14 at 16:12
• This was reproduced in my Mathematica 10.0.0 in Windows 7, 64 bit. In v9, I have never seen unbalanced "=" characters in any notebook magnifications. But in v10, I saw unbalanced ones in some magnifications. This is not an anti-aliasing problem (as you can see when you magnify fonts in screenshots). This seems to be the problem of showing specific characters such as "[", "_", "]", "=", etc. Interestingly, all of these characters seem to be rendered using MathematicaMono font which is introduced in v10. I found this when I "Save As" the notebook in PDF and open it in Adobe Illustrator. – Tetsuo Ichii Jul 19 '14 at 15:30

This problem is probably due to the MathematicaMono font which is introduced in v10.

Defining the problem:
Some fonts ("[","_","]","=", etc.) are rendered badly with strange thinning in v10 in some notebook magnifications. This is obvious when you compare the renderings from v10 with those from v9.

Analyzing the problem:
I found that all of these ugly-looking fonts were rendered in MathematicaMono font (specifically, MathematicaMono-Bold.ttf font in this example) by using the method described in my comment for the question section. MathematicaMono fonts are new in v10: we only have fonts named Mathematica1Mono, Mathematica2Mono, and so on, up to v9. These results suggested that the problem is caused by the new MathematicaMono fonts.

Next, to test this hypothesis, I substituted the MathematicaMono-Bold.ttf by Mathematica1mb.ttf (which contains Mathematica1Mono-Bold font) copied from my v9 installation folder. I renamed the name property of Mathematica1mb.ttf by using FontForge program ("Mathematica1Mono-Bold" to "MathematicaMono-Bold") and installed in the v10 font folder as MathematicaMono-Bold.ttf.

After the substitution, the notebook was rendered as in v9 at least for characters like "_" and "=":

Sadly, "[" and "]" were not fixed because Mathematica1Mono font lacks glyph for these characters. But anyway, the substitution experiment partially confirmed my hypothesis.

What's wrong in MathematicaMono font?:
I have no answer yet. So I can not provide the complete solution. But I found a strange thing in MathematicaMono font. In all of the newly introduced MathematicaXXX.ttf fonts in v10, "Win Ascent" and "Win Descent" properties for OpenType fonts are in strangely big values (5000 and 3500) compared with the values in v9 Mathematica fonts (1747 and 479). This makes the previews of MathematicaXXX fonts small in a strange way when you open the fonts in Windows font viewer program. But, I could not fixed the original problem even when I edited "Win Ascent" and "Win Descent" values of MathematicaMono-Bold font in FontForge.

I hope my answer helps someone to solve this problem.

Update 7/22: I found a clear evidence that the problem is in the MathematicaMono fonts. After you "install" the MathematicaMono.ttf and MathematicaMono-Bold.ttf, you can use MathematicaMono fonts in softwere other than Mathematica. Here is the MathematicaMono fonts rendered in Microsoft Word:

The rendering problems reported in Mathematica were completely reproduced in MS Word! This indicates that the problem is not in the Mathematica Front-end but in the font itself.

• Thanks for all the investigative work! I just wish we could have found some kind of workaround, apart going to therapy of course. – Gleno Jul 26 '14 at 17:16
• I have the same problem here with Mathematica 10.0.1.+ Win 7. Does any body use Mathematica 10.0.2 have this problem? And are there good candidate math font for substitution? – Nick Feb 2 '15 at 1:09
• Half solution: The strange thinning/unevenness of the equal sign becomes normal when I set the magnification to 125%. And it turns to bad again on 150%. It switches between Good and Bad with the increase of magnification ratio. So wired! – Nick Feb 2 '15 at 9:14
• 10.2.0.0 has this bug as well. – Shane Di Dona Sep 6 '15 at 18:11

I analyzed which fonts are loaded when starting Mma v10 compared to v9. The problem could be tracked down to the loading of the fonts in the Folder

$InstallationDirectory\SystemFiles\Fonts\TrueType If you open Mathematica-Bold.ttf or MathematicaMono-Bold.ttf, you will see how ugly these are. To prevent loading these fonts one should make a backup copy of this TrueType folder and than delete all .ttf files that are in it. A simple renaming of the folder increased the Mma startup time and is therefore not a good idea. Edit/Warning: AutoReplacements will not work after this customization! • I also tried to remove FrontEnd`FileName[{$InstallationDirectory, "SystemFiles", "Fonts"}] from the list in the Option Inspector: Global Options -> File Locations -> PrivatePaths -> "Fonts", but this did not solve the problem. – Karsten 7. Jul 20 '14 at 1:43
• Yes, how ugly they are! I moved these fonts away, some symbols could not displayed. (I know I probably should not do this.) Is there any high-quality math font we could substitute with them? – Nick Feb 2 '15 at 1:01

As a follow-up to Tetsuo Ichii's answer, the thinnings observed in version 10 are also present in 11.0.1: