4 ms·
Getting fonts to render correctly is a difficult task. Compositing in linear color space is the visually correct way to blend colors. But in practice no platfor
by bitbang 3y ago
Getting fonts to render correctly is a difficult task. Compositing in linear color space is the visually correct way to blend colors. But in practice no platform renders and composites fonts in linear color space, and each has opinionated approaches to how fonts should be rendered. Font designers can design a font with a specific platform in mind, that on another platform looks terrible. And people who spend all day working with a terminal can be very picky about how they want text to look. The latest release of Kitty provides tooling to allow tweaking the compositing settings so that any font in any color, can render as desired on any platform.
- foolrush 3y agoThis is not technically correct as best as I can ascertain. When we think about AA, it is a representation of sub pixel occlusion. As such, using uniform tristimulus to sample the “in between” value is incorrect. There is simply no “correct” approach because there are no known models that properly model visual cognition. What we can say though, is that the intermediate subpixel should not sample RGB tristimulus, but a loose nonuniform representation that approximates the lower order visual signal representation. When discarding signal, RGB tristimulus is more “correct”. When interpolating the signal, approximate lightness is more “correct”. Some solid analysis is available here: https://hhoppe.com/filtering.pdf https://hhoppe.com/filtering.pdf
- kevin_thibedeau 3y agoYou don't have to do subpixel AA. It's arguably worse on modern high DPI displays because of the color fringing that wouldn't be present with grayscale AA.
- arghwhat 3y agoSubpixel AA is always bad - it just might be a necessary but disgusting hack on screens with too low resolution to render fonts comfortably... Screenshots and screen recordings of subpixel AA content is foo without magic to get clients to disable such rendition during capture...
- thanatos519 3y agoHow about subpixel hinting? A white 1-pixel vertical line has the same amount of fringing whether it's RGB or GBR or BRG.
- enriquto 3y ago> Getting fonts to render correctly is a difficult task. Only if you insist in blurry fonts. Rendering sharp bitmap fonts is trivial. With the microscopic pixels that we have nowadays, bitmap fonts have more sense than ever. Too bad there is not a lot of variety in bitmap fonts of huge pixel size.
- vladvasiliu 3y agoI actually find that "with the microscopic pixels we have nowadays", all fonts are fine. I'm typing this on a 24" 4K screen, using normal fonts and they are very sharp. I do use sub-pixel rendering and don't have any issue even with light text on dark background (Using Linux X11 with fontconfig 2.14.2). However, the issue is that as soon as you leave high-end laptops, you actually rarely have "microscopic pixels". Most "business" screens are still a blurry mess with 1920x1080 24" panels. 32" 4k panels are serviceable (light text on dark background can get rainbowy), but you better not look at them from too close. 8k panels are still very expensive, at least in Western Europe. For these screens, I've found that bitmap fonts are the best. They're the only way to have really crisp text, and not some rainbowy-mess. And don't get me started on the fashion trend of skinny light fonts on dark backgrounds.
- LoganDark 3y ago> However, the issue is that as soon as you leave high-end laptops, you actually rarely have "microscopic pixels". What? I have had the complete opposite experience. High-end laptops (like, the ones that have multiple GPUs, or portable workstations, or gaming laptops, or etc.) tend to have utterly terrible displays, whereas cheap ultrabooks and chromebooks are the ones that get the 4K treatment. Maybe different allocation of cost?
- vladvasiliu 3y agoIt's indeed probably a question of definitions. I admit I wasn't thinking about "gaming" laptops nor models with dedicated GPUs, since I don't have a use for those and tend to prefer models without. I was thinking about macbooks and the likes of Dell XPS and Lenovo X1. I was referring to them as "high-end" since models with 4k screens tend to cost more than your "regular" enterprise-issue laptops, which usually have atrocious screens. The only laptops with HIDPI screens under 2000 € I can think of are the base Mx macbook airs. Since there are many "workable" (from a performance standpoint) models under 2000 € [0], I consider anything above "high end". I was even eyeing some Dell Latitude and Lenovo P a year or so ago (can't remember the exact model), which I would qualify as "portable workstations", since they had 4 DIMM slots, 3 or 4 NVMe slots and at least one of them actually had some kind of Xeon CPU with ECC RAM. They all had options for a 4K screen. They all cost more than 4000 €. Whereas the laptops we typically get at work (HP Pro and Elite books) top out at FHD, and usually are quite dim and sometimes don't even have 8 bit panels. --- [0] My current laptop is an EliteBook 845 G8. The laptop itself was around 1500 €, and upgraded to 64 GB of RAM and a Samsung 980 Pro, came in around 1800-1900 €. Aside from the absurdly bad screen, it's a laptop that is powerful enough for my needs.