30
$\begingroup$

My laptop has a 17 inch 4k screen, running Windows 10 and Ubuntu 1604. Both systems are set to 2x scaling. But Mathematica 11 (released 2016-08-08) is still blurry like version 10. Is there a simple fix to this problem?

$\endgroup$
7
  • 1
    $\begingroup$ I do not believe Mathematica on Windows/Linux supports High DPI screens as of this point in time. $\endgroup$
    – ktm
    Commented Aug 11, 2016 at 18:34
  • 2
    $\begingroup$ Related: 120463, Fontsize is too small, What is a printer's point?, 121089 $\endgroup$
    – Kuba
    Commented Aug 11, 2016 at 18:43
  • 1
    $\begingroup$ @user6014 Is 4k supported on a Mac? $\endgroup$
    – QuantumDot
    Commented Aug 11, 2016 at 19:22
  • 1
    $\begingroup$ @QuantumDot I know retina displays are supported, yes $\endgroup$
    – ktm
    Commented Aug 11, 2016 at 19:52
  • 1
    $\begingroup$ @Kuba The fontsize is not small, they are just blurry. $\endgroup$
    – Kaa1el
    Commented Aug 15, 2016 at 15:50

5 Answers 5

11
$\begingroup$

The best thing to do, IME, is to set the default notebook zoom level to something higher. This way, the text is rendered crisply and at a reasonable size.

You can do that as follows:

  1. Go to Preferences -> Advanced -> Open Option Inspector
  2. Set Show option values to Global Preferences
  3. Go to Notebook Options
  4. Go to Display Options
  5. Change magnification to whatever works for you.

Now, "100%" (default mag) will be rendered at whatever magnification you chose here.

$\endgroup$
6
  • $\begingroup$ This doesn't seem to address the resolution issue or am I missing something? I have my Windows setup at high DPI too and this doesn't alter the crispness of the resulting display. $\endgroup$ Commented Aug 15, 2016 at 12:38
  • 1
    $\begingroup$ @MohammedAlQuraishi Disable "DPI scaling" for Mathematica, then do what is suggested, which effectively boils down to SetOptions[$FrontEnd, Magnification -> 1]. A lot of things will not look quite right after this though (e.g. the search box in documentation), but better than nothing. $\endgroup$
    – masterxilo
    Commented Aug 18, 2016 at 18:54
  • $\begingroup$ On 4K, I recommend Magification -> 3 at least. $\endgroup$ Commented Aug 23, 2016 at 11:39
  • 1
    $\begingroup$ Also if you use method in the answer, then do this (but be aware that, notebook will look fine but everything other will be small): 1. Leftclick Mathematica shortcut. 2. Compability. 3. Change high DPI settings. 4. High DPI scalling override. 5. Set dropdown box to "Application". $\endgroup$
    – vasili111
    Commented Sep 12, 2019 at 19:30
  • 2
    $\begingroup$ I'm on Mathematica 12 and unfortunately this doesn't make any difference for me. $\endgroup$
    – iBug
    Commented Nov 24, 2019 at 11:57
9
$\begingroup$

Mathematica 11.2 seems to use Qt 5.6 framework which supports DPI scaling override. At least on Linux, it's possible to get bearable results by starting Mathematica as follows:

QT_SCALE_FACTOR=1.5 Mathematica

QT_SCALE_FACTOR is an environment variable that defines UI scaling. It seems to work quite well except for the splash screen.

$\endgroup$
7
  • $\begingroup$ Does this work in Windows as well? $\endgroup$
    – Pirx
    Commented Nov 8, 2017 at 12:13
  • $\begingroup$ You could try setting an environment variable either from CMD prompt or globally (remember to remove it later as it may break other QT apps) $\endgroup$ Commented Nov 8, 2017 at 13:02
  • $\begingroup$ That doesn't seem to do anything. I have a hunch that Mathematica does not use the QT framework on Windows. Oh well, with the disaster that is Windows 10 I may be switching to Mac OS soon anyway (Macbook Pro is on order). Then I hear that the Mac frontend is still 32-bit, with accompanying limitations. Can't win. Unless I switch to Linux... $\endgroup$
    – Pirx
    Commented Nov 8, 2017 at 23:24
  • $\begingroup$ It wouldn't make sense to use one toolkit on Linux and another on Windows. You can check the program directory to see if there are files like QtCore5.dll. I have tried to run another Qt app in Windows and it worked for me this way: C:\Users\User>set QT_SCALE_FACTOR=2 \\ C:\Users\User>"C:\Program Files (x86)\SpeedCrunch\speedcrunch.exe" $\endgroup$ Commented Nov 9, 2017 at 8:58
  • 1
    $\begingroup$ There are no Qt libraries for Mathematica on Windows, and no acceptable high-DPI behavior can be achieved in Windows. Mathematica is near-unusable under high-DPI Windows scenarios. $\endgroup$
    – Pirx
    Commented Dec 24, 2017 at 3:52
6
$\begingroup$

With Windows 10 Build 15002 and above, you can use the following settings to obtain a higher resolution of MMA than magnification for 200%, for example. Setting

$\endgroup$
3
  • $\begingroup$ This makes Mathematica readable, but the fonts are still blurry and not as crisp as they should be on such a high-resolution screen (see here community.wolfram.com/groups/-/m/t/1202244) $\endgroup$
    – divenex
    Commented Aug 31, 2018 at 13:37
  • $\begingroup$ Two figures/screenshots before & after the ticking are appreciated. $\endgroup$ Commented Nov 6, 2018 at 9:20
  • $\begingroup$ Is there a way to do this in Linux? $\endgroup$
    – Geremia
    Commented Dec 2, 2020 at 22:38
6
$\begingroup$

After a long wait, finally, Mathematica 12.1, launched in March 2020, introduces full support for high DPI monitors for both Windows and Linux. The upgrade from previous versions of Mathematica is beautifully impressive on a high-DPI screen!

$\endgroup$
4
$\begingroup$

I just wanted to add up to the answer by divenex.

Indeed, since version 12.1 Mathematica can perform a proper Hi-DPI scaling. I tried it on Ubuntu 20.04 LTS and the result was satisfying everywhere, except the initial splashscreen that is still somewhat broken. Both the UI elements and notebook contents, including code suggestions, scale correctly.

One non-trivial trick I wanted to mention, that could save someone's time:

In order to achieve proper scaling, one should navigate to Format → Object Inspector → Global Preferences → Global Options → System Configuration and set ScreenResolutionCompatibilityMode → False. Then inside the field ScreenInformation in the same panel, one should set Resolution→xxx, where xxx can be obtained by running xdpyinfo | grep resolution in Ubuntu.

Quick demonstration. Before:

Scaling before

And after the aforementioned modification:

Scaling after

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.