
State of Text Rendering (2010) - pcr910303
http://behdad.org/text/
======
raphlinus
This is a great reference, but ten years out of date. Unfortunately there is
no really good central place to get updated information on this.

For almost five years, I was tech lead of the text stack in Android. There are
a few things about the architecture not to like, but overall it is a world-
class implementation - it has refinements like hyphenation and Knuth-Plass
style paragraph layout, and of course emoji. It also had the benefit of
Roozbeh Pournader's work for much of that time, so it gets Unicode and locales
right. Among other things, I claim it does one of the best jobs on the "CJK
problem" of any stack out there, using both font selection and the locl
OpenType feature to adapt rendering for the preferred language(s). It's open
source of course, but does suffer from thin public documentation.

Another good source is Chromium, which tends to be a bit more open, with
discussions in the bug tracker and published documents, such as
[https://www.chromium.org/teams/layout-team/eliminating-
simpl...](https://www.chromium.org/teams/layout-team/eliminating-simple-text)

I'm interested in building the next stack in Rust, and have done some work in
this direction. I'd _love_ to see solid documentation as part of that effort,
but of course writing takes time and effort, and the target audience is quite
specialized.

~~~
hsivonen
> Among other things, I claim it does one of the best jobs on the "CJK
> problem" of any stack out there, using both font selection and the locl
> OpenType feature to adapt rendering for the preferred language(s).

What does Android infer the preference from? I’m using U.S. English as the UI
language with input method set to combined Finnish and English (with
Simplified Chinese, Traditional Chinese, Korean and Vietnamese also in my
input method list) and using a Finnish SIM, and Android 9 seems to pick
Simplified Chinese glyphs for me. (I’m not suggesting these signals should
have another result. I’m just curious what signals are considered meaningful.)

~~~
raphlinus
The main signal is the locale setting, which can have a list of languages in
it. For example, you could have Finnish as your primary language, with Hong
Kong Chinese second. Then CJK will get rendered as zh-Hant-HK.

Apps can set locale explicitly to override that, but almost none do. Probably
the motivating example is a translation app, which can then render both, say,
Chinese and Japanese correctly.

Input methods are technically a separate setting from your locale list, which
is maybe confusing but that's the way it is.

~~~
hsivonen
Thanks. I take it that Simplified Chinese is the default then, if none on the
CJK languages are in the UI language list.

~~~
raphlinus
Yes. Just based on numbers :)

------
mistrial9
.. reading the post, do we need to be reminded that text is rendered on more
devices than an Android mobile phone? Is 'done' == 'dead' here?

A web browser and a desktop interface (windowing,menus,mouse) sharing core
glyph engine components sounds important, at least. In other news, the state
of font availability, rendering fidelity and directional support are always
going to be changing across the entire world, no?

------
dang
From 2014:
[https://news.ycombinator.com/item?id=8084880](https://news.ycombinator.com/item?id=8084880)

Discussed at the time:
[https://news.ycombinator.com/item?id=1479870](https://news.ycombinator.com/item?id=1479870)

