Live data from Hacker News

The experience of rendering Arabic typography and its technical debt

lr0.org

21–30 of 87 posts

Re: The experience of rendering Arabic typography and its technical debt

#21
post #15

One thing I sometimes think about when I think about text layout problems is how the text we use also has a bunch of complexities that we can take for granted. Think of variable width characters and kerning and ligatures and hyphenation and justification. Imagine computers had been won by a CJK language, which have none of these problems. You could imagine a similar article about how exotic and difficult English layo…

[deleted]

Re: The experience of rendering Arabic typography and its technical debt

#22
post #9

Very interesting. I just implemented a text shaper and renderer from scratch with support for complex scripts like Arabic, Nastaliq and Indic (will soon post about it here on HN). Now that you write about it, the lack of stretching really is a deficiency in the OpenType spec. If you want a solution for this it has to happen in the rendering step, not the shaping (which is HarfBuzz's main task). The shaper has no info…

> but when rendering you could stretch individual glyphs to the desired width

“Individual glyphs” :)

It’s Arabic, so you wouldn’t stretch a single glyph, id would have to e done after shaping so you can work out the next run (either a single Aleph or the joined characters) in order to know what is stretchable (then throw it to your layout step)

Re: The experience of rendering Arabic typography and its technical debt

#23
post #15

One thing I sometimes think about when I think about text layout problems is how the text we use also has a bunch of complexities that we can take for granted. Think of variable width characters and kerning and ligatures and hyphenation and justification. Imagine computers had been won by a CJK language, which have none of these problems. You could imagine a similar article about how exotic and difficult English layo…

Both Latin and Chinese have been modified by the technology used to write them.

When carved in stone the lines are much straighter. When written with brush or pen they became semi-cursive. When printing was introduced, they became grid-like and regular.

What westerners who are passingly familiar would think of as the standard Chinese typeface - the strict square grid with straight-line characters - arises in part from printing technology. Easy to carve that into wood blocks, and easy to line up the slots into a grid.

Latin was similarly morphed to fit into the realities of printing in the 1500s. And is still being morphed. Notice how numbers 123... are in-line and at the same height as the letters. That's a very modern convention, typewriter and computer influence on our orthography. Traditionally digits were more likely to appear as subscript, off-centre.

Re: The experience of rendering Arabic typography and its technical debt

#24
post #15

One thing I sometimes think about when I think about text layout problems is how the text we use also has a bunch of complexities that we can take for granted. Think of variable width characters and kerning and ligatures and hyphenation and justification. Imagine computers had been won by a CJK language, which have none of these problems. You could imagine a similar article about how exotic and difficult English layo…

Conversely, English has a joined form(cursive) that is nearly dead because mechanical text assistance devices (first typewriters, now computers) work much better with the block form. While sad in a cultural loss sort of way the joined form only really makes sense when the text is hand written.

I am not familiar with the history of Arabic typography, but I sort of assume there was an archaic block form and their current joined form is the result of many centuries of encoding hand writing practice. advanced enough that falling back to a block form is impossible with the side effect of making simple mechanical text formatting also impossible.

As for Chinese derived characters. we currently are able to jam them awkwardly into our alphabet optimized structures(one code per character) but I wonder if a Chinese native encoding would look different. Would it make sense to try and represent the sub-characters present in each Chinese character in the encoding? I suspect not, Chinese works, but it also does not appear amiable to simple mechanical assistance.

Re: The experience of rendering Arabic typography and its technical debt

#25
post #18
post #12

Earlier quoted context omitted.

I think he's talking about the rendering algorithm with regards to the stream of text. essentially saying rendering direction should follow reading convention. on the other hand, in formal arabic, it's not unusual that numers are read in clusters from least significant to most significant (right to left). 1984 would be read : eighty four and nine hundred and a thousand. not sure if the author is aware of this

> rendering direction should follow reading convention. What does that even mean in this context? In a strictly LTR language, sure, you read left-to-right and the glyphs are rendered left-to-right. But the whole discussion is about bidirectional text, where the text is rendered by a complex algorithm. What is the “rendering direction”? I know just enough about some RTL languages to know that one can absolutely inters…

if you write (with a pen) text with mixed arabic, numbers, english words. then somebody else gets to read it, he will read arabic from right to left, then when when he encouters a number or an english word, he will naturally jump to the first latin letter of the word and start reading left to right, then jump back to the beginning if the next arabic word and switch back to RTL. the alogorithm should copy that behaviour.

Re: The experience of rendering Arabic typography and its technical debt

#26

This article is wonderful. It's interesting, it's captivating, full with detail, and to think I never gave much thought about Arabic rendering before. This part nearly had me chuckle audibly: He says yes. The result is "Simplified Arabic": initial fused into medial, final into isolated, ligatures dropped. It conquers the Arab newsroom in a generation. Mrowa is assassinated at his desk eight years later, by an unrelat…

maybe AI will solve this ?

Re: The experience of rendering Arabic typography and its technical debt

#27
post #10

Is this a small typo? > The relevant rule, W2 of UAX #9, reclassifies a digit as an ARABIC NUMBER if any of the previous strong characters in the paragraph were Arabic letters, and as a EUROPEAN NUMBER otherwise. Both render their internal digits left-to-right, which is correct: numbers everywhere on Earth are read most-significant-first. Does the author mean most-significant-on-the-left? The statement as written is…

This is a thing I have wondered about. are arabic numbers little endian when embeded in arabic text? The text is read right to left. But the numbers are the same as we put them in our left to right text where they are big-endian(read big to small). so are numbers in original arabic little-endian? read small to large. with the interesting side effect that numbers are universal.

Re: The experience of rendering Arabic typography and its technical debt

#28
post #23
post #15

One thing I sometimes think about when I think about text layout problems is how the text we use also has a bunch of complexities that we can take for granted. Think of variable width characters and kerning and ligatures and hyphenation and justification. Imagine computers had been won by a CJK language, which have none of these problems. You could imagine a similar article about how exotic and difficult English layo…

Both Latin and Chinese have been modified by the technology used to write them. When carved in stone the lines are much straighter. When written with brush or pen they became semi-cursive. When printing was introduced, they became grid-like and regular. What westerners who are passingly familiar would think of as the standard Chinese typeface - the strict square grid with straight-line characters - arises in part fro…

what selective pressures against oldstyle numerals with ascenders/descenders existed that wouldn't have equally applied to letterforms with those same features?

(aha i have found the answer to my own question: miniaturization for fractions in phototypesetting)

Re: The experience of rendering Arabic typography and its technical debt

#29
post #26

This article is wonderful. It's interesting, it's captivating, full with detail, and to think I never gave much thought about Arabic rendering before. This part nearly had me chuckle audibly: He says yes. The result is "Simplified Arabic": initial fused into medial, final into isolated, ligatures dropped. It conquers the Arab newsroom in a generation. Mrowa is assassinated at his desk eight years later, by an unrelat…

maybe AI will solve this ?

AI can probably solve "how do we get good shaper implementations into software", provided a good enough spec and test suite are available, but it won't solve "how do we convince stakeholders to value supporting languages spoken by massive numbers of people", most likely

Re: The experience of rendering Arabic typography and its technical debt

#30
post #24
post #15

One thing I sometimes think about when I think about text layout problems is how the text we use also has a bunch of complexities that we can take for granted. Think of variable width characters and kerning and ligatures and hyphenation and justification. Imagine computers had been won by a CJK language, which have none of these problems. You could imagine a similar article about how exotic and difficult English layo…

Conversely, English has a joined form(cursive) that is nearly dead because mechanical text assistance devices (first typewriters, now computers) work much better with the block form. While sad in a cultural loss sort of way the joined form only really makes sense when the text is hand written. I am not familiar with the history of Arabic typography, but I sort of assume there was an archaic block form and their curre…

Another wrinkle with Arabic is linguistic conservatism. Due to Islamism and the idea that Arabic is the language of of God (the Quran was written in Arabic by the supposedly illiterate prophet), Arabic has lagged behind other languages in terms of innovation.

Hebrew is a closely related semitic language that simply adopted a block and cursive form. It has also been greatly simplified and friendlier towards loanwords, which has made it far easier to learn.

Post reply on HN