7 ms·
The sad state of font rendering on Linux (2018)
- necovek 1y agoOne thing that used to be possible with Freetype was configuring how "heavy" hinting was: I remember the time when autohinted fonts looked the best with "light" hinting. They were smooth, non-bold and I couldn't see colour fringing either. You could also set the RGBA vs whatever pixel layout in the same Gnome settings dialog. Easy-peasy adjustment for a VA panel. After, it was available only in gconf/dconf or a tool like gnome-tweaks or similar. MacOS is definitely terrible today, but I prefer Linux over Windows still.
- webdevver 1y agothe art of drawing pixels generally appears to elude free software. its always kind of sucked. if you're talking about compute shaders, its ok. but the moment it hits the screen, ouch!
- gmueckl 1y agoRendering can become extremely nuanced and finicky. Sometimes it can be solved with better, harder to implement algorithms and sometimes it requires tradeoffs that lead to good design. All of this needs time and time is a resource that is scarce in open source.
- zekica 1y agoSubpixel rendering works completely fine on Linux. I'm using it right now, using "full" hinting and "RGB" subpixel rendering. It even works completely fine with "non-integer" scaling in KDE, even in firefox when "widget.wayland.fractional-scale.enabled" is enabled.
- vouaobrasil 1y agoOn the other hand, subpixel rendering is absent from MacOS and makes it very difficult to using regular ol' 1920x1080 screens with modern MacOS. Yes, those Retina displays look nice, but it's a shame that lower res screens do not because they work perfectly fine except for the font rendering.
- nomel 1y agoMy first (and last) 1920x1080 monitor was 50lb CRT I picked up on the side of the road, in 2003. I haven't owned a smartphone with a screen resolution that low, in over 10 years. I think it's an amazing feat of marketing, by display companies, that people still put up with such low resolutions.
- vouaobrasil 1y agoThat's true that they aren't interested. But I still like such screens. I used one quite recently, and it worked just fine for my needs.
- lttlrck 1y agoIt's still a perfectly serviceable resolution. Of course 16:19 pushed down display costs leading to the demise of 1920x1200 which is unforgivable ;-) Those 120 pixels were sorely missed.
- hnuser123456 1y agoYou can still get 16:10, they're just classed as "business professional" models with matching price tag.
- LargoLasskhyfv 1y agoBuy them refurbished instead, then.
- sam_lowry_ 1y agoHm... I am reading this on a 1600x900 screen of my T420s Frankenpad while sitting in dusk in a German campsite. I ordered the screen some 10 years ago off Alibaba or something, and it is exactly the resolution and brightness I need. I hope I will die before this Frankenpad, because contemporary laptops are awful in so many aspects. You know... as you age, you really can't read all those tiny characters anyway.
- msgodel 1y agoIt works on Xterm for me, I didn't enable anything special except using a vector font. That's something that OSX doesn't even have now.
- jchw 1y agoTo me one of the most influential pieces of writing about subpixel rendering and in particular an exploration of the ways Microsoft got it wrong was the writings by the late developer of Anti-Grain Geometry, Maxim Shemanarev (R.I.P.) https://agg.sourceforge.net/antigrain.com/research/font_rasterization/index.html https://agg.sourceforge.net/antigrain.com/research/font_rast... Though to be fair to this article, Microsoft did improve things with DirectWrite, and yes the situation on Linux is quite bad unfortunately. Also bonus, a pretty great article here talking about gamma correctness in font rendering, an issue that is often somewhat overlooked even when it is acknowledged. https://hikogui.org/2022/10/24/the-trouble-with-anti-aliasing.html https://hikogui.org/2022/10/24/the-trouble-with-anti-aliasin... Just some additional reading materials if you're interested in this sort of thing.
- neoden 1y agoThe article is from 2018 and that should be mentioned in the title
- scblock 1y agoWindows has the worst font rendering of all modern operating systems. Wanting anything like Windows font rendering is insane. Windows 10 makes it near impossible to properly turn off subpixel hinting without also turning off all anti-aliasing, which on a QD-OLED screen makes for horrific color fringing. Windows 11 is better, but still pretty weak. Linux is roughly as good as Mac OS, both of which are miles better than Windows. Mac OS dropped the subpixel garbage (it really is garbage if you're at all sensitive to fringing or use anything other than a standard LCD) in favor of high pixel density screens. Sharp, readable text and zero color fringing. This is the way.
- Night_Thastus 1y agoWith OLEDs with funky pixel layouts starting to become more popular, I hope Windows starts making their system less crap...
- dartharva 1y agoHeavily disagree as a longtime Linux user. I don't know about MacOS but Windows has always had better font rendering than Linux in my experience.
- b3orn 1y agoI'm currently using a Mac for private stuff, used to use Linux for work stuff, currently forced to use Windows. My font rendereing ranking is MacOS > Linux > Windows.
- tgv 1y agoI rate it macOS > Windows > Linux. iOS is pretty good too, mobile Windows wasn't. But I'm only experiencing Linux graphically on a rather old monitor or through a terminal emulator, and macOS and Windows on a nice monitor, so that probably skews my perception. I wonder how many people observe the three OS'es through the same (or very similar) monitors.
- TLLtchvL8KZ 1y agoI feel exactly the same, the font rendering in Linux drives me absolutely insane. The amount of hours I've spent over the past 15 years tweaking fontconfig, having to compile special patched packages etc etc doesn't bare thinking about. I don't even have to edit anything on Windows now, and when I did a few years ago it was only on a clean install going through I think what was called cleartype config, you had a panel of 6 images/samples to choose from and after going through it all everything looked pretty damn perfect.
- whalesalad 1y agoI can't really agree with this at all. I am a very design-heavy person who has been using a Mac professionally since the x86 transition, and have very strong opinions about font rendering, color accuracy, etc. About 2 years ago, I built a beast of a Linux workstation and use it with a 5K Apple Studio Display. Everything looks flawless and pixel perfect.
- zuhsetaqi 1y agoCould be that it changed in Linux a lot in the last few years. The article is from 2018.
- zerocrates 1y agoYeah, I'm happy with my Linux font rendering for sure, and I would say generally it's more Apple-esque, so some reasonably large degree of this is just opinion and preference. There was definitely a time when, to get good results, you had to do a lot more tweaking, setting things in fontconfig, using patched Freetype, but I don't really experience that anymore now for quite some time. I do still bring around a fonts.conf to my machines basically out of habit... the only relevant thing it does now probably is disable embedded bitmaps. It's always a little bit of whiplash seeing how different this very site looks when I occasionally am on a Windows machine, with Verdana rendering quite differently there, and to my mind, worse.
- ivape 1y agoI still don't know why MacOS can't render sharp text on 1440p external monitor.
- zuhsetaqi 1y agoBecause 1440p is not a sharp external monitor.
- sunnyps 1y agoEver heard of subpixel rendering? You can have pretty sharp text at even 90 ppi if your OS supports it. MacOS doesn't, probably because they didn't want the complexity of supporting it throughout their compositing/graphics stack, and also likely because Apple doesn't sell any low ppi displays.
- ranger207 1y agoWell see Apple doesn't sell 1440p external monitors, so the answer is you should stop using that trash and move to one that brute forces the sharpness problem and costs way too much because it has an Apple logo on it
- deleted 1y ago[deleted]
- kstrauser 1y agoCute, but irrelevant. I just searched Amazon for "4k monitor 27 inch" and there are any number of highly rated screens from recognizable brands for around $200. You don't have to splurge to get a 2160p monitor that a Mac will love.
- ivape 1y agoThose monitors kind of suck. You can only get $200 if it's a crappy VA panel at 60hz. My 1440p monitor is a lot better, but apparently not supported by Mac for ideal rendering.
- 1y ago
- bee_rider 1y agoWhat’s wrong with the v35 freetype picture? He writes like it is immediately obvious, but it seems fine.
- jchw 1y agoSee the jump from 17pt to 18pt? That's wrong. (Also, the small sizes are just completely obliterated IMO.) Font outlines are scalable; they should have the same relative weight no matter what pt/px size you render them at, and they should have the same proportions. Non-scalable rendering is incorrect (although techniques like hinting and gridfitting do intentionally sacrifice scalability for better legibility, but I argue you can do better in most cases.)
- bee_rider 1y agoWho cares? That only matters if you have a bizarre document that is incrementing through all the font sizes.
- jchw 1y agoWell, because it literally distorts the glyphs and thus doesn't actually look right, it would be like if some of the pixels on your screen were inexplicably the wrong color due to a color management issue. In some cases the distortion is really bad and doesn't even really improve legibility at all, so it's just a plain lose/lose. If you don't give a shit about typography in the least and don't care about the visual weight of text then fine, but not caring doesn't mean the behavior is correct by any means. (And keep in mind, you will often have more than one font size of text on screen at once, so this distortion will change the relative weight of fonts incorrectly, aside from also distorting the actual shape of glyphs.) But OK, other than just being incorrect, does it matter? Many people don't have proper color management in their software and it's usually fine. Well, yes, sometimes it matters. For one thing, this issue really screwed up scaling in Win32 and even GTK+2, because if you tried to render dialogs with different font sizes it would completely change the UI and screw up some of the component sizing. OK, though, you can fix that by just not using a fixed layout. However, you still run into this problem if you want to render something that actually does have a specific layout. The most obvious example of how this can be a serious problem is something like Microsoft Word that is meant to give you a WYSIWYG view of a document on paper, but the paper is 300+ DPI and the poor screen is only 96 DPI. Maybe most importantly, this is all pointless! We don't actually have to settle for these concessions for Latin script text on 96 DPI screens. Seriously, we really don't. I recommend this (old) article for a dive into the problems caused by non-scalable font rendering and how it could've probably been solved all along: https://agg.sourceforge.net/antigrain.com/research/font_rasterization/index.html https://agg.sourceforge.net/antigrain.com/research/font_rast... (Though to be fair, there are still problems with the approach of vertical-only hinting, as it does cause distortion too.)
- rramon 1y agoFont rendering isn't the bottle neck on Linux, imo it's the terrible default font choices of distro and desktop environment makers.
- ranger207 1y agoI think Linux font rendering looks fine (although it has noticeably gotten better since this post was last updated in 2019) but I absolutely agree that MacOS has the worst looking font rendering. And I was using it on a genuine MacBook Pro! Discussions otherwise have convinced my that apparently font rendering just isn't objective but is opinion based
- RGBCube 1y agoAlmost MacOS-tier font rendering, for free: FREETYPE_PROPERTIES="cff:no-stem-darkening=0 autofitter:no-stem-darkening=0" Probably only good in high DPI monitors though.
- bradfitz 1y agoI haven't used displays with under ~215ppi in over 10 years. I find these subpixel opinion discussions still ongoing very... quaint. :)
- sunnyps 1y agoSo you haven't used a 32 inch 4K monitor which is ~135 ppi? What do you get at that size, a 5K or 6K monitor? Not many of those available and they have specific requirements like higher display port or thunderbolt bandwidth. There's also an entire world of users still on 720p and 1080p displays. They deserve better font rendering even if it doesn't affect us personally.
- bradfitz 1y agoI haven't. I have 5K and 6K monitors. That's indeed privileged, but only for a bit until that's soon commonplace and cheap. So this all sounds like a very temporary problem at this point for something so subjective. Every time this topic comes up it's the same "but I like the look of $OS rendering the best" comments.
- 6yyyyyy 1y agoHigh PPI screens have been around for 10 years or so, and they still cost about twice as much as a standard PPI screen the same size. Put yourself in the shoes of the average computer purchaser: Would you rather buy a high PPI monitor, or two standard PPI monitors? To me this is a no-brainer.
- vouaobrasil 1y agoMaybe you can afford such a display. But I still like regular HD displays because they are cheap and functional.
- initramfs 1y agothis is excellent. I know what they mean on Windows. Because not all linux distros support ClearType-like fonts out of the box.
- RGBCube 1y ago@dang, post is from 2018, so adding (2018) to the title may help as the current state of font rendering on Linux is pretty fine.
- tomhow 1y agoAdded, thanks!
- uncircle 1y ago(2019) In the era of 4k screens, modern Linux distros have great font rendering and I won't take Windows as an example of "good rendering", unless font distortion because of strong hinting is a metric of quality. It is just atrocious to my eyes. It's pretty easy to be honest: have a high-enough resolution screen, enable greyscale mode (instead of subpixel), turn off hinting. Usually only the latter has to be changed in the settings, as many Linux users still use 1080p screen that benefit from font hinting.
- nine_k 1y agoIt's 2025, and the font rendering I can achieve on Linux is best for my purposes: clarity, readability, especially of small fonts. So yes, on a web page, or in a text editor, I do prefer small distortions due to hinting over fuzzy "exact" shapes any day. Text is here to be read, not marveled at. If I need to do typographic work, I can zoom in enough for this to not matter, or just print a proof on a laser printer; no screen is going to have 1200dpi any time soon anyway. Windows 10 takes the second place (I have no Win 11 machines around to compare), and macOS is still only usable on retina screens.
- dang 1y agoRelated. Others? The sad state of font rendering on Linux - https://news.ycombinator.com/item?id=41812358 https://news.ycombinator.com/item?id=41812358 - Oct 2024 (18 comments) The sad state of font rendering on Linux - https://news.ycombinator.com/item?id=19312404 https://news.ycombinator.com/item?id=19312404 - March 2019 (167 comments)
- zahlman 1y agoI keep hearing people talk about how Linux font rendering is supposedly so bad, but I simply haven't noticed any issues with it since switching from Windows on my home machine over 3 years ago. > There is not even a hint of any consistency in the rendering either, thickness is all over the place even within a single glyph, with different strokes “sticking” together because of the lack of pixels: Only the "H" looks even a little bit wrong to me. > As you can see here, indeed, OS X had sub-pixel anti-aliasing in High Sierra, which provided less boldness and bluriness with somewhat better consistency in glyph thickness. However, colour fringing on High Sierra is rather apparent. Rendering is still rather blurry, closer to the FreeType auto-hinter than to what I would consider an optimal result. The "H" looks just as wrong with and without this feature to me. Overall the new version without the feature is indeed a little bit "bolder" and "blurrier" - and given that it's white on dark grey, I'm pretty sure I prefer it that way. > Thickness linearity between font sizes on the second image is fantastic. But compare the overall thickness at standard web font size (16px) to any other option and you will see that this comes at the cost of making everything bold by default: Only the v35 version looks noticeably "less bold" to me here, although the autohinted version is perhaps a bit more blurry. But it's hard to imagine how "thickness linearity" could ever be accomplished without causing this sort of blurriness. But maybe I'm just unbothered because I grew up with "luggable" Mac displays and bitmap fonts.... > With current state of Linux, it does not matter which engine you pick. They all are broken in the same way: I searched the page for matching words (or at least letter combinations) and the actual rendered text isn't showing the same issues for me as in the screen capture. > By the time I was updating this post in August 2019, Cairo received support for sub-pixel positioning in both xlib and image compositors. This means that GTK will soon have it too, as well as Pango and basically anything that relies on Cairo to render text. I am looking forward to the next Ubuntu LTS and might make a separate post about compiling this into the current Ubuntu LTS. ... Ah, I guess that must have happened, then. ---- On the other hand, GTK has caused me all kinds of problems. The default scrollbar theming is obnoxious, and if you fix it, it still doesn't seem to be consistently applied. Firefox does its own thing unless you look up an obscure about:config setting, and even then it still seems to mess up. GTK offers this really weird default style for window tabs(?) that required complete relearning, and that's with Cinnamon being supposedly designed for maximum Windows-alike-ness. Then there's the continued battle from GNOME to try to deny proper notifications and/or a system tray to everyone else. And don't even get me started on the file chooser.
- omnimus 1y agoOne important detail is that fonts themselves have their own hinting rendering tables so authors can decide how fonts will be rendered on low dpi screens. This is tedious and expensive. And you guessed it many libre fonts simply dont do it right or have capacity to do it at all. Thats why there can be quite big quality jump when you compare it to fonts from big design teams from Apple or Microsoft. Not only the font might be a bit worse, the rendering/hinting is often way worse.
- layer8 1y agoExactly. This is why whenever the release of a new font is being posted here (usually coding fonts), I end up being not interested due to the lack of pixel-level hinting.
- deleted 1y ago[deleted]
- omnimus 1y agoLooking ar the comments it seems that it is very subjective. People seem to prefer what they are used to the most. Fits with me - long time mac user i like Mac rendering, linux feels very similar and i like it. Windows feels like somebody is burning the fonts into lcd. It is probably more legible in tiny sizes on low pixel screens but it is too strong and not very elegant everywhere else.
- ndiddy 1y ago> The traditional way of achieving this is through installing ttf-mscorefonts-installer or msttcorefonts. The msttcorefonts package looks like some Shenzhen basement knockoff that renders poorly and doesn’t support Unicode. I suspect that these fonts have gone through multiple iterations in every Windows release and that the versions available through the repositories must be from around Windows 95 days. This is because these font files originate from a Microsoft initiative called "Core Fonts for the web" that ran between 1996 and 2002. Before web fonts became a thing, Microsoft wanted to make a set of broadly available fonts that web designers could assume everyone had on their computers. Because Microsoft cancelled the initiative, the redistributable versions of those fonts are stuck in time. They were last updated around 2000, and any updated versions with further improvements or added characters aren't freely redistributable.
- Sunspark 1y agoThis is OK for me because I use these with full (or medium) hinting and anti-aliasing off in some apps, and greyscale anti-aliasing in other apps with the v35 interpreter. v40 with slight hinting and greyscale or subpixel works, but I don't tend to use the fonts that are meant to be used with slight hinting and later fonts can't handle anti-aliasing off at all. You can easily do this on a per-app basis with flatpaks.. you can set an environment variable with flatseal, and you can drop a fontconfig folder with a custom fonts.conf in the flatpak's var directory.
- zzo38computer 1y agoI prefer to use non-Unicode bitmap fonts on Linux. It works fine in programs that support them; unfortunately many programs don't support them in all contexts (in some cases, bitmap fonts work in some places but not others). When I write my own programs, I try to ensure that non-Unicode bitmap fonts work.
- LargoLasskhyfv 1y agohttps://en.wikipedia.org/wiki/Infinality_bundle https://en.wikipedia.org/wiki/Infinality_bundle took care of that. Until it got more or less resolved by upstream with modernized components, and made redundant.