Hacker News new | ask | show | jobs
by adrian_b 1687 days ago
I do not think I understand which is exactly your problem.

I use monitors with different sizes and I am not aware of a way to specify in Linux a scale factor for each monitor, so if I move a window from a larger monitor to a smaller monitor, then the window, including its text, will become smaller (or possibly greater, if the second monitor has a much lower resolution), the ratio in sizes depending on both the ratio between the physical sizes and the ratio between the resolutions.

If the monitors would have very different resolutions and/or sizes, then there is no doubt that the setup would become difficult to use, unless you use some applications that you always open on a certain monitor and then you do not move them to other monitors, so you can select in the application preferences a font size and a window size appropriate for that monitor.

What I do not understand, is your reference to a blurry rendering, because the application window should be rendered in the same way on any monitor, which would lead to different text sizes, but not to differences in blurriness.

I have been using HiDPI displays in Linux for 6 or 7 years, without any problems and I also do not understand what is meant when people talk about "scaling", this might be something specific to Gnome or KDE, which I do not use. In any case "scaling" (as in Windows) sounds like something that should be strictly avoided. The fonts must be rendered for the right number of dots per font size, they must not be scaled from renderings for other DPIs (which would indeed cause blurriness).

In XFCE, you have one global setting for fonts "Custom DPI setting", which, together with the settings for anti-aliasing and hinting, determines how all the typefaces will be rendered.

After setting an appropriate high value for DPI and choosing in your applications adequate font sizes, there are no blurriness problems whatsoever, if you take care to use decent typefaces. The default typefaces in most Linux distributions are seldom good, but there are many excellent typefaces, both free and commercial.

The only programs with which I ever had problems on HiDPI in Linux are those written in Java, which very frequently lack any options for changing the font used by the program, which I consider to be a capital sin for any GUI program. Moreover, for many Java programs, the installers that use a GUI crash and die on monitors with more than 8 bit per pixel. In my experience Java is always the farthest from its claim of "write once, run everywhere".

1 comments

What is there not to understand? This is not hard or complex.

I am guessing that if you are not getting what the problem is here, you must be pretty young and have good eyesight. Perhaps you also mainly use single-screen setups.

(By comparison, I am 53, myopic, and normally wear varilux spectacles to give me different focal lengths which my eyes' lenses can no longer provide.)

As an example: I have 3 screens on my work setup. A 24" screen in portrait (80dpi), a 22" in landscape (87dpi) and the laptop's built-in 12½" (110dpi).

The difference between the 2 external screens is not really noticeable, but the internal screen's density is significantly higher. When I put windows on that display, their contents become much smaller, to the extent that they are hard to read.

That is the problem here. On my Macs, when I attach an external screen, the OS adjusts the scaling factor so that windows, text, controls and so on are the same size on all displays. You can even position a window over the split between monitors and the OS adjusts the contents on the fly.

X.org can't do that. You get one global scaling factor for all displays.

I would like my internal screen to show its contents at 1¼× the size of the external screens, but X.org can't do that.

Wayland can, but I don't like most of the desktops that run on Wayland. I can't stand GNOME and dislike KDE. I prefer Xfce or Ubuntu Unity -- but they don't run on Wayland. (Yet, in the case of Xfce.)

This leaves 2 less-than-ideal choices: run LCDs at non-native resolutions in order to roughly match on-screen sizes, or put up with things changing size and possibly being unreadably small.

These options are tolerable on standard-definition screens, but they aren't on HiDPI screens. Worse still, a mixture of HiDPI and SD screens can be totally unusable.