Hacker News new | past | comments | ask | show | jobs | submit login

> DPI scaling hackery

Under X11 with KDE, or under Windows, that's no problem whatsoever. 144dpi isn't any more hacky than 96dpi or 192dpi.

It's only macOS, Gnome and Wayland that require 1x or 2x scaling (which is absolutely mind-bogglingly ridiculous, and anyone that contributed to that or encouraged that should be banned from ever touching UI code again).




Fractional scaling is just broken by design. If you have combined vector/bitmap graphics (like most web pages) designed for 'canonical' DPI, you can either break proportions between vectors and bitmaps (rendering vectors with proper DPI, while for bitmaps use nearest integer scale), or render everything with proper scale and introduce artifacts like blurring of sharp edges to bitmaps.


Why is that broken by design? You'll never see content that's in integer scale of its original source anyway. e.g., many Sony cameras have a 6K sensor but downscale (not binning) the image to 4K.

Android btw uses the same type of scaling – you'll just get slightly blurry edges, but that's not much of an issue.

It's much better to have slight blurring around the few rare edges where legacy bitmaps are used.

The alternatives are

1) full-screen blurring, broken gamma correction and wasted performance (e.g. rendering at 2x to display at 1x) of full-screen scaling

2) content that's not the correct scale, making it too small or too large to work with.

I'd much rather have a situation where the 1% of content that uses legacy bitmaps is blurry vs EVERYTHING being blurry.


And yet browsers support a whole range of fractional scaling, often letting you pick individual percentage points. Same with word processors.


Fractional scaling on Linux is still hit or miss in my experience. I played with several permutations of Wayland/X11/GNOME (with fractional enabled)/KDE and none got it 100% right, and even under the setup that got closest some programs acted confused.

It’s certainly not as painless as fractional scaling on Windows, where only truly ancient/esoteric programs pose issues typically.


I'm not sure what issues in Wayland you're talking about. I've been using sway with fractional scaling for a few years now and never really had any problems.


Sway with Wayland has every application render at both 1x and 2x and then has the compositor scale the application.

This sounds like a really attractive idea until you realize that a 1.25x 1080p screen means you’re now rendering everything at 3K resolution, including any and all games.

Additionally compositors often scale directly in sRGB, which means you’re introducing lots of gamma errors.


For a trivial use case, try attaching a 1080p monitor to a 1440p laptop and open Microsoft word or task manager. Text will be blurry.


I've got a 3840x2160 and a 1024x1280 (yes, portrait) monitors under windows. The first one at 144dpi, the second at 96dpi. The first at 10-bit 600 nits DCI-P3, the second at 8-bit 300 nits sRGB. Works just fine.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: