Live data from Hacker News

Fractional scales, fonts and hinting

blog.gtk.org

101–110 of 117 posts

Re: Fractional scales, fonts and hinting

#101
post #90

I don't understand this. It seems that they: - Fail to properly position glyphs horizontally (they must obviously be aligned to pixels horizontally and not just vertically) - Fail to use TrueType bytecode instead of the autohinter - Fail to support subpixel antialiasing These are standard features that have been there for 20 years and are critical and essential in any non-toy software that renders text. How come GTK+…

[deleted]

Re: Fractional scales, fonts and hinting

#103

How does KDE (or is it Qt) font rendering compare?

Qt6 has had fractional scale early on and still supports subpixel AA. Qt5 near the end of its life got fractional DPI scaling support on X11, but not on Wayland. KDE generally seems to handle scaling better nowadays compared to GNOME.

Re: Fractional scales, fonts and hinting

#104

Earlier quoted context omitted.

You really don't want to do subpixel AA anymore. For one, subpixels aren't just lines in some order - they can have completely arbitrary geometries. A triangle, 3 vertical slats, a square split in four with a duplicate of one color, 4 different colors, subpixels that activate differently depending not just on chromaticity but also luminance (i.e., also differs with monitor brightness instead of just color), subpixels…

Subpixel AA is still more readable for non-HiDPI LCD screens, which are still the majority of desktop monitors sold today. It did work well enough for people to be using it for so long, and the situation with screens on desktop has mostly not changed.

It also works great with almost but not-quite HiDPI screens such as commonly available and cheap 4K 27" monitors. You can scale them at 150% and with ClearType it looks as good as super expensive 6K Mac screen.

In fact since cleartype effectively triples resolution I guess you get quality of 12K display?

Re: Fractional scales, fonts and hinting

#105
post #81

I don’t have anything expert to add here except this is somehow a shockingly difficult problem. When I boot into windows, the fonts especially in some applications look horrible and blurry because of my high DPI monitor. Windows has like 10 settings you can try to tweak high dpi fonts and man none of them look good. I think my Linux boot on the same machine has much better font smoothness and of course the MacBook is…

Not sure this is shockingly difficult, especially when for a lot of Windows apps you can already deblur the fonts by clicking a high dpi compatibility setting of a given exe file

I’ve literally never had that compatibility setting make a difference in the cases I tried. I am sure it does something in certain cases where the blurryness has a certain root cause but not universally

Re: Fractional scales, fonts and hinting

#106
post #104

Earlier quoted context omitted.

Subpixel AA is still more readable for non-HiDPI LCD screens, which are still the majority of desktop monitors sold today. It did work well enough for people to be using it for so long, and the situation with screens on desktop has mostly not changed.

It also works great with almost but not-quite HiDPI screens such as commonly available and cheap 4K 27" monitors. You can scale them at 150% and with ClearType it looks as good as super expensive 6K Mac screen. In fact since cleartype effectively triples resolution I guess you get quality of 12K display?

I agree, although this isn't as noticeable as it is on a true low dpi screen. In the monitor market anything higher resolution than a 27 inch 4K tends to be ludicrously expensive, and won't be an option for most people. With Windows having pretty functional fractional scaling, I doubt anything higher than 4K will ever become mainstream, since at the distance you are using your desktop monitor, more resolution is of limited value.

Re: Fractional scales, fonts and hinting

#107
post #2

As a long-time developer against GTK (I started using it back in the 1.x days in the late 90s) this is really awesome to see. I enjoyed the side-by-side comparisons of the old vs new renderer, and especially the idea of homing in on particular letters ('T' and 'e') and extracting them, that really made the improvement clear. Cool stuff, and many thanks to the developers who keep pushing the GTK stack forwards.

The "old" renderer feels so new to me, that I'd like to see the comparison against GTK+ 3.0 with pango P.S. Since pango 1.44 some letters at some positions became blurry and some letters are more close to the previous one than being in the middle. Actually the later issue might be needed to prevent the first one, in theory. In practice, there might be other constraints, which force the corruption.

Re: Fractional scales, fonts and hinting

#108

And still no proper gamma correction.. wich makes the whole thing useless, specially on low-DPI screens Nobody does it properly on linux, despite freetype's recommendations.. a shame.. https://freetype.org/freetype2/docs/hinting/text-rendering-g... It's even worse for Light text on Dark backgrounds.. text becomes hard to read.. GTK is not alone Chromium/Electron tries but is wrong 1.2 instead of 1.8, and doesn't do g…

> This seems to fix the blurry fonts with Wayland instead of X:

  flatpak --socket=wayland run com.visualstudio.code --enable-features=UseOzonePlatform --ozone-platform=wayland
https://github.com/flathub/com.visualstudio.code/issues/398 :

> Various font-related flags I found in solving for blurry fonts on wayland

Is there an environment variable to select Wayland instead of XWayland for electron apps like Slack and VScode where fractional scaling with wayland doesn't work out of the box?

Re: Fractional scales, fonts and hinting

#109
post #7

Earlier quoted context omitted.

Reading it up, heated issue is putting it midly. That was a complete shitshow, with two gnome devs - and one from redhat specifically - not accepting the obviously awful font rendering as an issue and continuinously insulting the reporters. God I hate those type of Foss devs. And then on the other hand you have finally a seemingly great solution, despite their sabotage. So, yeah gnome?

I read the post using Firefox on Windows, and even though I've been aware of the font rendering controversy for a while, I was actually shocked by just how huge the difference was between the crisp, properly rendered text in the article and the font rendering in the "before" screenshot.

Not surprising as the Firefox devs invested a lot of effort into high-quality, gamma-correct subpixel text rendering that worked well with hardware accelerated compositing. One of the reasons I stuck with it.

Reading through one of the GTK4 issue threads, it seems that one problem with early versions was an insufficient gamma correction strategy.

Re: Fractional scales, fonts and hinting

#110
post #81

Earlier quoted context omitted.

Not sure this is shockingly difficult, especially when for a lot of Windows apps you can already deblur the fonts by clicking a high dpi compatibility setting of a given exe file

I’ve literally never had that compatibility setting make a difference in the cases I tried. I am sure it does something in certain cases where the blurryness has a certain root cause but not universally

Interesting, works for a lot of apps for me, (note that there are 3 options, sometimes enhanced is only one that works) though usually some toolbar becomes too small

But yes, unfortunately, it's not universal

Post reply on HN