Hi-DPI in Windows and why it hasn't happened yet (Cool story)

Hello,

I’m writing this to you and I feel that it has been too long since any attention was brought to this, and no actions have been taken on, ever.

The issue is defined as:

  • 4K/High Resolution monitors make the text smaller than what is comfortable for the eye on Windows.
  • Unity texts also appear smaller as the result of high resolution per inch.

Workaround for every other windows application is either of these cases:

  • The text is scaled up automatically and is seamless just like the native Windows OS texts.
  • The compatibility settings can be changed for a particular software to make the text appear pixelated but at least enlarged so it’s easily readable.

Now how about Unity.exe:

  • The first workaround obviously doesn’t work for Unity, even in the latest 2017.3.
  • The second workaround makes Unity’s text pixelated but at least enlarged and readable but with a caveat. The render views also appear pixelated. They appear as if you had a 500x400 image and enlarged it by using nearest-neighbor algorithm to a 1000x800. This makes even the best scene view/game view look like crap.

As a comparison:

(normal)


(pixelated)

Now, just to be extra safe I’m going to give the benefit of the doubt and say I may be doing something wrong and it works for everyone else. If so, I apologize and I appreciate if you share your settings that works the way it should.

If not,

Dear Unity Team,
Please solve this problem. It is almost 2018 and there are more and more people who are purchasing 4K/High Res monitors. At least the render views, I am hoping that could be a quick fix. Getting high dpi text can wait. We can live with a general quality enlarged text, but it’s hard to accept the pixelated render (goes back to images above and thinks how sad the right side image looks).

Since we like democracy, here’s a bunch of feedback links (dated all the way back to 2011) about people that are suffering ( I will quote some testimonials without mentioning names):

Thanks and I look forward to hear the team’s thoughts.

Cheers!

5 Likes

I added a poll just to have a bit more visibility.

1 Like

This is getting ridiculous. Unity Team, I first noticed this issue in 2013. It should’ve been fixed in 2013, yet here we are.

@
This realy need to take into consideration. My eyes get hurt !!!

If I was aware of this issue I would have never bought 4k monitor :frowning:

Also no response from Unity Team makes me very sad. I love you guys but give us atleast some feedback, if you don’t plan to do anything about it no problem, we won’t wait we buy monitors without scaling and that’s it…

Don’t be sad when Unity doesn’t respond to yet another dupe thread on this same topic. As they have said before:

I agree. Just bought a new laptop with 1080p screen. And the choice is either have small menus and squint or have large blurred menus. It’s because Unity editor is not “DPI aware”.

Mostly I choose to have larger blurry menus.

But with the new shader graph, its better to have the DPI set lower so you can fit more nodes on the screen at the same time.

As a quick fix you can set the DPI awareness on a per-application basis by right clicking on the Unity icon and looking in compatibility tab. But then just be prepared to use a magnifying glass to read the menu items.

This looks like a pretty deep issue to support.

They have done it for Mac many moons ago. At this point of time, we are not looking for a perfect and complete solution. We just need the bare minimum: Expose font size to us.

Before anyone else respond to fonts. You can find the source of UnityEditor.dll online and see how they are generating almost all of the windows and their components in Unity Editor: The same way as we do.

What I mean is, if you see the text in the scene hierarchy is size x, that’s because it’s using a GUI.Skin that has that particular size. One can hypothetically patch those code to have a larger font size. So no, The immediate solution is not very challenging.

That seems wildly simplified. Not sure how this works for Mac, but rarely is anything as simple as “oh just hook that to a value and poof”.

I know right? Who would have thought the editor itself was written using the exact API as users use for adding editor functionality!

I agree that this is a huge issue currently. Steam and Unity are the only programs I own that don’t support DPI scaling. Either have a blurry editor or tiny text.

So,…in Unity 2018 we can choose from 4 (four!) rendering pipelines Unity Blog that only a handful of developers are going use.

But the editor doesn’t display correctly on a 4K screen??? Which ALL developers use…
I’m not sure if Unity has it’s priorities right :(:eyes:

.

Apple worked on arbitrary scaling for quite some time, but eventually gave up and just went with 2X scaling. That is, a 3840x2160 4K screen will operate essentially like a 1920x1080 HD screen, except everything is 4X more detailed (2X horizontal and 2X vertical). It turns out that in the real world, this covers most actual use cases for computer displays and is easier on developers compared to arbitrary scaling.

So it is with hdpi mode in Unity: nothing is physically bigger or smaller, it’s the same effective size, just 4X more detailed. It’s not arbitrary scaling, and the end result is not really changing font sizes; the way the editor works for practical purposes doesn’t actually change. e.g. a GUI.Box (Rect(50, 50, 400, 200)) will work identically on both normal and hdpi modes, even if, under the hood, the actual pixel values for the hdpi mode are technically Rect(100, 100, 800, 400).

You’re correct that just changing a font size value is not how it works…for an illustration, assuming you have a browser that allows you to force a minimum font size, set it to say twice the normal size, and observe that many web sites are now broken to some degree.

Judging from the msdn link posted above, Windows hdpi support is more complicated, and they couldn’t just port the Mac 2X hdpi code.

Really? (Had to use wayback machine, Unity seems to have removed the hardware stats page for some reason, though that’s the 2017.3 stats.)

–Eric

I mean: ALL developers use the editor. Yet this 4K problem still isn’t fixed or any word on when it will get fixed.

Bit off topic but:

They recommend making a UWP app to handle 4k, meaning no cleartype support so it looks worse on hd (no sub-pixel font rendering), but good on 4k?!
Apple got away with this by basically making all their displays 4k but if most Windows users are not using 4k and appreciate cleartype for sharper fonts this is bad news.

The other problem with 4k for windows users is manufacturers make 4k laptops (because 4k!!) but with underpowered gpus so now apps running in native resolution are really slow.

I have also purchased a 34" 2K monitor, and although the gain in real estate is nice, the eyes do hurt after a while. The font size in Unity is so tiny, I always need to hunch to read the text.
Visual Studio, for example exposes font size for many different categories and changing the font size made a HUGE difference for me.

I tried that option and although it makes things more readable, it totally defeats the purpose of me spending money on a 34" high rez monitor, since the main reason I bought it is because I wanted to fit more stuff on the screen.

native text scaling , is the only option that will resolve this issue. I understand that Unity was created before the 4K era but now they need to allocate more resource to have this resolved. more and more studios and indies are buying 4k/2k monitors.

Does anyone know how, if at all, UE4 addressed this issue? just curious?

There’s still sub-pixel rendering on regular displays with Macs. Only some of their models have hdpi screens at all (and not 4K aside from iMacs), plus the models that don’t have displays (Mac mini, Mac pro) are using who knows what. However the font rendering in the Unity editor does not use sub-pixel rendering for some reason, just regular anti-aliasing. It’s worse than sub-pixel rendering, but not painfully so. Looking at Windows screenshots, it doesn’t use sub-pixel rendering there either. So not using cleartype is what the situation already is. (Edit: except for drop-down lists…those use OS controls rather than Unity controls, and have sub-pixel rendering on Mac and Windows.)

–Eric

oh ok yes, but sub pixel font rendering in Unity would be difficult with it’s non-native font rendering I guess - thus no cleartype. It does seem to get away with it in the editor through careful font selection and pixel snapping, but it can be a challenge when making text-heavy games/apps with it.
If it just renders the text at double resolution on 4k windows (as with mac?) it should be fine in future

Hell partially froze over when Zbrush finally started supporting 4K scaling. I’d love for the rest to freeze with Unity supporting it…