7 ms·
No more blurry fonts in Linux (2023)
- mjevans 2y agoOn the one hand... OK great for consumption. On the other... Wouldn't this lead to terrible choices in font selection for anyone NOT using these settings?
- bongobingo1 2y agoThe "on" image looks closer to how I see fonts on macOS, so probably optimising that way has a bigger win. I don't use the system often though.
- hyperhello 2y agoWhy can’t I see the difference? Does this only work for older, standard resolution screens?
- __mharrison__ 2y agoI could only see the difference when I viewed the images at 250x.
- deleted 2y ago[deleted]
- Cort3z 2y agoClick the picture to get a full resolution version. On my phone it's quite obvious. But to my eyes it just looks like someone made it bolder, not less blurry.
- hedora 2y agoYeah; something seems wrong with their setup. I’ve seen Linux render fonts like that, but not recently. I’d probably look into debugging my setup if that’s what my desktop looked like.
- KronisLV 2y agoOff: https://blog.aktsbot.in/img/stem-darkening-off.png https://blog.aktsbot.in/img/stem-darkening-off.png On: https://blog.aktsbot.in/img/stem-darkening-on.png https://blog.aktsbot.in/img/stem-darkening-on.png Personally, I never had issues with fonts on any OS that much except when I connected my M1 MacBook to a 1080p monitor, then it felt like the fonts had no anti-aliasing at all.
- pjerem 2y agoMacOS have always had the best font rendering on HiDPI screens and also the worst on Low-DPI. Windows is historically very good on Low-DPI but they also managed to be great on HiDPI. Linux, well, it depends on so much things … you can achieve good on both but you’d better be ok with integer scaling and not have multiple displays with different DPI.
- cehrlich 2y agoMacs used to have good font rendering on Low-DPI displays (I would say the best, but I suppose that’s a matter of opinion) Then Mojave switched to Metal and removed subpixel AA, and now it’s the worst. Thread from when it happened: https://news.ycombinator.com/item?id=17476873 https://news.ycombinator.com/item?id=17476873
- kelnos 2y agoIt's funny to read that thread (from 6 years ago, wow time flies) and see complaints that a lot of people have low-dpi external displays. But I think some of the rebuttal comments in that article rang true even then, and certainly do now: if you are spending money on an Apple laptop or workstation, Apple is going to expect you to spend money on hi-dpi external monitors.
- nasretdinov 2y agoYeah, the issue is that 6 years ago your only option for a highdpi monitor with the correct scale (e.g. for 27'' it needs to be 5k, not 4k) would be the iMac or the XDR display that costs over $5k... Now that Apple sells their own (very decent) monitor at somewhat more affordable price it makes sense to use it as an external display, I agree.
- konart 2y agoLook at the 'e' for example. Night and day difference. PS: talking about screenshots in the article.
- Flex247A 2y agoCan someone comment on the effect lcdfilter has? Seems like full hinting + RGB antialiasing is the way to go on non 4K displays.
- Apreche 2y agoIt's an improvement, but it's still absolute garbage. Just throw in the towel already. Copy whatever MacOS does and have it be the default.
- adgjlsfhk1 2y agothe macos approach is to only ship weird and nonstandard monitor resolutions to convince people to buy your fancy display that costs 5x as much
- p1necone 2y agoIsn't "what MacOS does" just shipping extremely high DPI screens on everything + using regular anti-aliasing on fonts with no hinting or subpixel rendering?
- konart 2y agoI have Fedora Kinoite and Mbpr M1Pro connected to the same 4k Dell monitor. Font rendering is still much better on macos than any settings in Fedora.
- MindSpunk 2y agoProbably because MacOS doesn't do fractional scaling. If you're not using a scaling mode that's an integer multiple of your monitor resolution MacOS oversamples the whole display. Kinonite is KDE iirc which can do fractional scaling (quite well too) on KDE 6. So if you're comparing 1.5x scaling on KDE compared to MacOS you're actually comparing a 3840x2160 render to 5120x2880.
- konart 2y agoMacOS was doing fractional scaling long before KDE even began to implement it. UPD: just to be clear - even on macbook's screen macOS uses scaled resolution by default.
- 2y ago
- elwebmaster 2y agoSecond screenshot looks blurrier to me than the first. Both are bad. It’s not a Mac.
- MindSpunk 2y agoMac font rendering on non retina displays is pretty awful. Mac 'cheats' somewhat with hDPI screens + aggressive super sampling as MacOS doesn't do fractional scaling and instead rounds up to the nearest integer multiple. At my current display scaling settings my MBP is using a 5120x2880 buffer for my 4k (3840x2160) as it's set to scale to a logical size of 2560x1440. Under a fair comparison on a 1080p display with no scaling even Windows demolishes MacOS these days. Apple dropped support for subpixel AA years ago which really hurts on standard DPI rendering.
- funcDropShadow 2y agoThis idea of scaling graphics up and down instead of rendering at the display native resolution with size measurements in dpi-independent units was so bad. I understood it to be a neat trick, when the first retina displays were relased. But everything afterwards is just awfull.
- nasretdinov 2y agoWith fractional scaling you can get objects misaligned otherwise, and I personally found it very annoying e.g. in VSCode with 1.25x zoom, where the objects would move slightly when you interact with them, due to imperfect and inconsistent size calculations. IMO the way Apple does this is quite brute force and unconventional, but at least the picture doesn't drift with different scale.
- funcDropShadow 2y agoFractional scaling is not the alternative.
- Lorkki 2y ago
- anothername12 2y agoIf I have a 4K display, do I still need to worry about font rendering settings?
- konart 2y agoWhat kind of sadist sets `font-size: 10.5pt;`? Sorry about that rant.
- pjmlp 2y agoKind of, as usual, given the desktop fragmentation.
- peter_retief 2y agoI cant see the difference?
- peter_retief 2y agoI just opened a file in VIM and it does look denser/clearer. Cool.
- makz 2y agoI kind of prefer the fonts in the first screenshot
- muppetman 2y agoSame I wonder if they're mixed up
- qwertox 2y agoI agree. The second one looks like it has `font-weight` increased, making it all somewhat bolder, reducing the distance to the bold font.
- larschdk 2y agoBoth use subpixel rendering is that it is specific to the display where it is shown. You need the same subpixel ordering and you can't really scale it. Your preference may be correct on your display, while mine is correct here: I strongly prefer the second image. The first image has less hinting, causing the top of the x-height to be rendered at a half pixel. This makes it seem less intense that the rest of the letters. The second image aligns way better and have a more consistent intensity and sharp edges, but gives an overall slightly more bold appearance, and also compromises a tiny bit on the actual shape of letters.
- otabdeveloper4 2y agoThis, I like the blurry fonts. They should fix kerning bugs for certain popular fonts instead.
- greenavocado 2y agoBoth are garbage if you are on a low DPI display
- dartharva 2y agoFont rendering on linux tends to be garbage even if you have a high DPI display
- hollerith 2y agoI used to prefer font rendering on Gnome to that of MacOS and Windows, but as of Gnome 46, they changed it so that if you set a fractional scale factor, everything gets blurry (a different kind of blurry than the OP means) just like it does on MacOS, making Windows font rendering the desktop font rendering I like the best as long as I stick to relatively modern apps like browsers, VSCode and the newer apps that comes with Windows like Settings. (Legacy apps on Windows are super super blurry at fractional scale factors.) I use non-HiDPI 1920-pixel-wide displays at scale factors between 1.25 and 2.0. (Yes, I like big type and big UI elements: my eyesight is bad.)
- omnimus 2y agoSounds like you might have something to do with Wayland?
- mmcnl 2y agoNo, Linux (Gnome/Wayland) uses a method similar to macOS where everything is rendered at a higher resolution and then scaled down. If you have a very high DPI display it looks nice, but if the DPI is not that high to begin with you will notice that the result is a bit blurry. Only Windows has truly good scaling.
- hollerith 2y agoI agree. The blurriness at fractional scaling factors on Mac and in very recent versions of Gnome is obvious on a non-HiDPI display (at least a 24-inch one like the ones I use). Until a year ago, Gnome/Wayland did it the way Windows does it! I.e. the method the OS used to make the text and the other UI elements the size the user specified refrained from applying any blurriness-causing resolution-scaling algorithm as long as you avoided the XWayland compatibility layer (and the compatibility layer that lets modern Windows support legacy apps makes the legacy app blurry, too). Chrome's "zoom" feature (activated by the keyboard shortcuts Ctrl+plus and Ctrl+minus for example) does fractional scaling (i.e., allows the user to adjust the size of the text and the other UI elements) without introducing any blurriness. Installing Chrome and experimenting with that feature is probably the easiest way for the average reader to see what we are talking about. One parenthetical detail is that (unlike on Mac or Windows) in order to get fractional scaling at all on Gnome/Wayland you have had to use a command line to add a particular key to a list named 'experimental-features', but that will change next month when Gnome version 47 will be released, at which time the user will be able to change the scaling factor in the Settings app just like one can on Mac or Windows without first having to configure anything or opt in to anything. I would love to know the reasoning behind the Gnome team's decision here because just because although you or I might not be able to notice the blurriness on a HiDPI display or to say with confidence that the blurriness is there doesn't mean that the image is as sharp as it could be: the scaling algorithm used on Mac and on Gnome versions 46 and 47 is clearly throwing some "visual information" away regardless of the resolution of the display.
- Rayaan22 2y ago[dead]
- zhenyi 2y agoVideo showing the before/after: https://streamable.com/904w6l https://streamable.com/904w6l
- dang 2y agoRelated: No more blurry fonts in Linux - https://news.ycombinator.com/item?id=39640329 https://news.ycombinator.com/item?id=39640329 - March 2024 (2 comments) No more blurry fonts in Linux - https://news.ycombinator.com/item?id=38853588 https://news.ycombinator.com/item?id=38853588 - Jan 2024 (1 comment)
- 7e 2y agoLinux fonts have never been beautiful, and probably never will be. The talent is just not there. Give me a high DPI Mac any day. Now that is beauty.
- omnimus 2y agoI am not sure if you are talking about fonts included with the OS or about rendering. But on high DPI screen all OS render fonts well (and pretty much the same). Its how the OS renders the small type on low DPI screens where lots of guessing from rendering engine has to happen. About the font choices for sure Mac has better selection than open source typefaces… but you know you can take your San Francisco and install it on Linux if you want.
- mmcnl 2y agomacOS doesn't do anything with fonts. They removed all aliasing features. The Apple solution is to use retina displays for everything. That works great with Linux too.
- kalleboo 2y agomacOS absolutely does antialiasing, it's just grayscale antialiasing instead of sub-pixel antialiasing. This is obvious if you mess with CSS "font-smoothing: none"
- lofaszvanitt 2y agoBoth look shit.
- bad_username 2y agoAm I the last person on the Earth to turn off font smoothing completely and use fonts perfectly hinted to the pixel grid? Can't get any sharper than that, and really helps with eye strain.
- arexxbifs 2y agoNope[1]. [1] https://datagubbe.se/fontfest/ https://datagubbe.se/fontfest/
- nielssp 2y agoNo, at least that's what I'm going for as well, at least for monospace fonts in editors and such. I can't stand the slightly blurry look of antialiased fonts and absolutely prefer the crisp edges of traditional bitmap fonts.
- globular-toast 2y agoDo you have a working config for this on Linux?
- bad_username 2y agoThis is a regular control panel setting in Linux Mint (Cinnamon). Not sure about other distros.
- arexxbifs 2y agoTry this: $ cat $HOME/.config/fontconfig/fonts.conf <match target="font"> <edit name="rgba" mode="assign"> <const>none</const> </edit> <test qual="any" name="size" compare="more"> <double>1</double> </test> <test qual="any" name="size" compare="less"> <double>22</double> </test> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> <edit name="hintstyle" mode="assign"> <const>hintfull</const> </edit> </match>
- NoGravitas 2y agoI do this only for specific fonts at specific sizes.
- zokier 2y agoThe problem with all these font rendering discussions is that we are missing some ultra-high quality (offline) reference rendering system to compare against. Not only does that make these discussions pretty unproductive (just subjective back and forth), but also practically that drives font designers to build fonts that look good on their preferred platform(s), rather than something that is built to look good on spec. This drives then feedback loop where other platforms then need to start emulating the major popular platforms with their flaws instead of aiming for the highest quality; for example this stem-darkening is almost certainly just inspired by macos but doesn't really have justification outside that.
- winternewt 2y agoOn a related note, I thought that by 2024 we would have displays with 250+ dpi resolution, but to my disappointment I'm still waiting for this to be a reality on anything but small laptop screens. A lot of the rendering tricks that corrupt the appearance of fonts have to do with how few pixels are available for rasterisation. We should have been getting print-quality text by now.
- craftkiller 2y agoAhem... https://tftcentral.co.uk/news/viewsonic-vg3281-with-31-5-ips-panel-and-8k-resolution-launched https://tftcentral.co.uk/news/viewsonic-vg3281-with-31-5-ips... Personally I'm holding out for UHBR20 Edit: Also there's this one from 2017 https://www.dell.com/en-us/shop/dell-ultrasharp-32-8k-monitor-up3218k/apd/210-alez/monitors-monitor-accessories https://www.dell.com/en-us/shop/dell-ultrasharp-32-8k-monito...
- winternewt 2y agoRight, I have seen the Dell screen before. But it is currently an extremely niche product which means it is wildly outside my price range. And the VG3281 is still not available in my country even though it was released in 2023.
- bartvk 2y ago
- gjvc 2y agoThis works very well on my 4k screen. Every discussion of font rendering technology must include a statement to the effect of "Acorn RISC OS fonts from 1990 have not been bettered". :-)
- bamboozled 2y agoThe screenshots look the same to me?