Sublime Forum

Automatic scaling on HiDPI Monitors with DPI > 144 does not work correctly on Linux

#1

Hi,

I am using ST3 Build 3201 running on Ubuntu 16.04 with i3 window manager. My notebook is HP 250 G5 and its built-in screen has 141 DPI. Sublime correctly detects that is HiDPI and scales itself up accordingly.

But on work, I connect my notebook to external monitor which has 157 DPI and I disable built-in monitor. Here is sublime not scaled up properly and it stays same.

In order to configure DPI, I use .Xresources with following settings for builtin monitor:
Xft.dpi: 141
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
#Xcursor.size: 40
and
Xft.dpi: 157
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
#Xcursor.size: 40
for external monitor.

To investigating issue, I used only built-in monitor and I tried to change (fake) DPI settings to see how ST3 would behave. I noticed that if I keep increasing DPI, ST3 will keep upscaling as long as DPI <= 144. Once I set DPI to be bigger then 144, ST3 will be smaller then it was during 144 DPI.

I noticed that 144 is exactly 96 x 1.5, so I guess it has to do something with standard DPI and that factor. I wonder whenever I am missing something or this is bug in ST3.

Thanks
Sasa

0 Likes