Why are some GUI fonts so small in Ubuntu 20.04? How can I fix them?

I installed MATLAB 2020 via a university license and I noticed the fonts are extra small. Additionally, upon startup of Ubuntu a GUI opens up for my password which is also very small. I don't have that problem with other GUI windows I used in Ubuntu 20.04. What is the cause and how could I fix it?

Specially for MATLAB.

Enter image description here


Solution 1:

Following this suggestion by sarnold from Ubuntu IRC channel it is fixed now:

>> s = settings;s.matlab.desktop.DisplayScaleFactor
>> s.matlab.desktop.DisplayScaleFactor.PersonalValue = 2

It currently looks like this: enter image description here

Solution 2:

I am not sure what's the cause

The problem is fundamentally there are two reasons to increase screen resoloution.

  1. To fit more stuff on the screen.
  2. To display the same amount of stuff at higher quality.

Historically with most computers and for users with normal vision the number of pixels was the limiting factor on how much stuff you could fit on the screen. So while display systems did have a DPI field it was frequently ignored by applications and often bore little resemblence to the actual DPI of the display. Even when it wasn't ignored it often only scaled some elements and not others leading to a mess when users changed it from the default value.

In recent years though "high DPI" systems have started to hit the market, where the screen resoloution is so high that the users vision, rather than the resoloution of the display is the limiting factor on what you can usefully fit on the screen. On such screens the size in pixels of the GUI elements must be increased to keep stuff at a size that is acceptable to the user.

Display systems have had to adapt to this change but not all software has caught up yet. Windows works around it by the brute force approach of forciblly scaling legacy software after it is rendered but I don't think there is anything similar on Linux.