Live data from Hacker News

Text Rendering Hates You

gankra.github.io

131–140 of 172 posts

Re: Text Rendering Hates You

#131
post #51

Earlier quoted context omitted.

Elaboration for "ちょっ" Japanese hiragana chi, small yo, and small tsu. Hiragana is a syllabary (not alphabet!) comprised of 46 sounds. Small hiragana can be used to modify the sound of the leading character to expand the set of available phonemes. Here, "Chi (small)yo" becomes "cho". Small tsu is special. It represents a doubled or germinated consonant. For example ちょっと (chotto) sounds like chot-to. Example: https://m…

Japanese is one of the few languages with a worse writing system than English. Hats off to them for it. I do miss the pre-war spellings though, where they wrote things based on 10c pronunciation, eg AU is pronounced OH (like in French). Tibetan is also in pretty desperate need of spelling reform. I’d love to hear replies about other terrible writing systems.

Tibetan and French usually come up on lists of worst correspondence between orthography and pronunciation. Irish is also pretty bad. (It makes sense once you learn how it works, then stops making sense once you hear people of different dialects actually pronounce words.)

Re: Text Rendering Hates You

#132
post #82

Earlier quoted context omitted.

Yes, it makes sense. My beef is not that subpixel doesn’t make sense, it’s that the term is overloaded. Standard antialiasing also involves subpixels and the term makes perfect sense there too. From my perspective, “subpixel” fails to differentiate. Now, using “Greyscale” to mean color, just not LCD color, that one doesn’t make as much sense to me. Some articles call it “whole pixel anatialiasing” or “traditional ant…

How does standard antialiasing involve subpixels - are you talking about retina or something? It applies alpha to pixels of whatever size right? What's the sub- part?

It’s common in both software and especially hardware to render at a higher resolution and then filter & downsample. The 2x2 or 3x3 or 4x4 etc pixels in the higher resolution that correspond to the 1 pixel at final resolution, those are called subpixels. For example, you can read about subpixels in descriptions of traditional aliasing as well as GPU antialiasing.

https://en.m.wikipedia.org/wiki/Spatial_anti-aliasing

https://en.m.wikipedia.org/wiki/Multisample_anti-aliasing

The term subpixel is often referring to virtual pixels used to compute some final pixel value, as opposed to the LCD specific idea of a physical subpixel that’s red, green, or blue. Look around, for example, for discussions on subpixel resolution, subpixel positioning, subpixel animation, etc. Those are usually talking about the virtual kind used in traditional antialiasing, not the physical LCD subpixels.

Re: Text Rendering Hates You

#133
post #132

Earlier quoted context omitted.

How does standard antialiasing involve subpixels - are you talking about retina or something? It applies alpha to pixels of whatever size right? What's the sub- part?

It’s common in both software and especially hardware to render at a higher resolution and then filter & downsample. The 2x2 or 3x3 or 4x4 etc pixels in the higher resolution that correspond to the 1 pixel at final resolution, those are called subpixels. For example, you can read about subpixels in descriptions of traditional aliasing as well as GPU antialiasing. https://en.m.wikipedia.org/wiki/Spatial_anti-aliasing h…

To add to the confusion, OpenGL uses the term 'fragment' for what you're calling subpixels.

Re: Text Rendering Hates You

#134

Earlier quoted context omitted.

There are over 2.5 billion active Android devices ( https://twitter.com/Android/status/1125822326183014401 ). There were over 700 million active iPhones in 2017, likely more today ( https://fortune.com/2017/03/06/apple-iphone-use-worldwide/ ). So conservatively there are over 3 billion smartphones. Microsoft claims there are over 1 billion Windows 10 installations ( https://news.microsoft.com/bythenumbers/en/windowsd…

> So conservatively there are over 3 billion smartphones. > so that means that less than 2 billion Windows installations are in existence. In what world is 3 billion out of 5 billion >= 90%? I repeat "Half sure, 90% no."

I think I misread the GP. I interpreted it as a claim that someday, Windows won’t have a 90% market share.

Re: Text Rendering Hates You

#135
post #43

A few minor things missing in OP (mostly CJK related) - Code point is sometimes not enough to determine the glyph. For example, U+5199 must look different in Simplified Chinese and Japanese. Typically this is handled by using different fonts, but more formally it should be marked with different lang attributes (in case of HTML). - Top-to-bottom writing mode is still pretty much in use in Japanese. HTML support is poo…

Also Arabic mixed with English goes RTL for the Arabic parts and LTR for the English parts: https://docs.oracle.com/javase/8/javafx/user-interface-tutor... (bottom)

Re: Text Rendering Hates You

#136

The other comments about the details rendering are great and an example of how much depth of knowledge you can find on HN (and all this is now well beyond my experience). What I'd be curious about here, though, is what this says about large scale software engineering. Text rendering has to be one of the most common activities within a large number of computer program sorts and I know pieces of the text rendering proc…

Across all coding paradigms, it is always good to abstract at the correct level and to modularize as much as possible (really these are two sides of the same coin). The leaky nature of text rendering means that the only level you can really abstract at is the topmost level, and you’re left simply covering every imaginable case individually. Not sure if that can be solved by a programming paradigm.

Re: Text Rendering Hates You

#137
post #133
post #132

Earlier quoted context omitted.

It’s common in both software and especially hardware to render at a higher resolution and then filter & downsample. The 2x2 or 3x3 or 4x4 etc pixels in the higher resolution that correspond to the 1 pixel at final resolution, those are called subpixels. For example, you can read about subpixels in descriptions of traditional aliasing as well as GPU antialiasing. https://en.m.wikipedia.org/wiki/Spatial_anti-aliasing h…

To add to the confusion, OpenGL uses the term 'fragment' for what you're calling subpixels.

Yes that’s an interesting point, the “fragment” terminology can be confusing at first. But I think of fragments as something slightly different. “Fragment” means basically pixel or subpixel geometry, it’s output from the rasterizer. The fragment shader is what takes a fragment as input and then outputs the pixel or subpixel color. Fragments aren’t necessarily involved in GPU antialiasing, you can have subpixels in OpenGL without fragments, if you’re doing image processing without rasterizing. In any case, it’s a good thing that they picked a different word to define, and didn’t just call it “subpixel”, right?

Re: Text Rendering Hates You

#138

The other comments about the details rendering are great and an example of how much depth of knowledge you can find on HN (and all this is now well beyond my experience). What I'd be curious about here, though, is what this says about large scale software engineering. Text rendering has to be one of the most common activities within a large number of computer program sorts and I know pieces of the text rendering proc…

Across all coding paradigms, it is always good to abstract at the correct level and to modularize as much as possible (really these are two sides of the same coin). The leaky nature of text rendering means that the only level you can really abstract at is the topmost level, and you’re left simply covering every imaginable case individually. Not sure if that can be solved by a programming paradigm.

But is text rendering "inherently leaky"? Or more leaky than large scale accounting data or etc?

At that rate, it seems like just about any messy, multilevel problem can be taken as inherently leaky and not something design paradigms can make easier. Maybe the solution is, "there is no solution" but as an optimist, it's hard for me to accept that.

(And yeah, I should have said "design paradigm", not programming paradigm).

Re: Text Rendering Hates You

#139
post #113
post #73

I realize it’s probably too late, but as a graphics person, every time I read about text antialiasing, I wish we could rewind and fix the terminology of “Subpixel antialiasing” and “Greyscale antialiasing”. It seems problematic that greyscale antialiasing involves subpixel sampling and color channels. I’d suggest “LCD antialiasing” to replace “subpixel antialiasing”. And regular antialiasing doesn’t really need a ter…

"LCD" antialiasing worked fine on trinitron CRTs which had a well defined RGB alignment. Calling it LCD alignment is more confusing.

Sure, that’s fair. Maybe LCD is a bad suggestion. It’s not like I’ll be able to change it, but just for fun, is there a better term that isn’t confusing? Because subpixel and especially greyscale seem pretty confusing.

Re: Text Rendering Hates You

#140
post #71

> So subpixel-AA is a really neat hack that can significantly improve text legibility, great! But, sadly, it's also a huge pain in the neck! When playing around with FreeType's ftview demo program, text rendered with an OTF/CFF font using the Adobe CFF renderer with stem darkening enabled actually looks pretty good with grayscale rendering. Subpixel rendering is not strictly necessary. > https://gankra.github.io/blah…

+1. Subpixel AA seemed quite necessary back in the day with Windows XP and tiny, precisely hinted Tahoma/Verdana/etc. These days, with bigger better bolder fonts, better renderers, and the departure from pixel-perfect stuff in favor of higher resolutions, subpixel is absolutely unnecessary. Even on LoDPI screens I turn it off (assign none to lcdfilter in fontconfig) because the color fringes are so ugly. I always not…

Subpixel AA is absolutely not unnecessary these days. I've seen a few programs switch off from it recently (in favor of grayscale AA) and every time it's been noticably more blurry. For example, Discord had a bug that disabled it just a few weeks ago (which has been fixed since), and Twitch's redesign also disabled it in their desktop app (which is why I now use Twitch almost exclusively on Firefox). Both of these apps are based on electron/chromium though, so text rendering, even with grayscale AA, could be better in some other programs.

Unless we completely abandon small font sizes or switch exclusively to high-dpi screens (will likely happen eventually, but we're not there yet), subpixel AA can look much sharper than grayscale AA if properly configured and you're not sensitive to the color fringes (personally, sitting at about an arm's length from my monitor, I don't notice them at all). And I'd rather not have text rendering quality suddenly downgraded on my existing peripherals before that happens.

Post reply on HN