21 Aug 2006
(updated 21 Aug 2006 at 09:10 UTC) »
The End is near
And there are sure signs:
This is a Japanese paragraph, laid oud according to Japanese traditional typography rules, ie. running vertically, from top to bottom and with lines stacked from right to left. Notice the highlighted text. Red is Latin script, which normally doesn’t run vertical, therefore it’s rotated to retain shape in a foreign environment. The blue part is digits, which are considered script-neutral, therefore they get laid out according to the direction currently in effect.
And here’s how it’s done:
What doesn’t work perfectly yet is alternate embedding modes (as there’s more than one way imaginable to try and fit horizontal text in a vertical paragraph). Need to debug it.
So, I fixed the bug mentioned previously, as I expected, it was because of errors in my copypasted option parsing code in the test viewer. Now I can try out all modes, and for those of you who expected the post-apocalyptic world to be dwelled by strange and bizzare creatures, you were right. Check out this curiosity:
This is a result of laying out a random snippets of text (taken from Wikipedia and Qatar’s MoFA site, respectively), to test multiscript layout, rendered in EMBED_LINE mode. This mode will layout paragraphs, trying to agree all foreign scripts with the primary direction glyphs run in. And as you can no doubt see, they have been agreed indeed. Except that to get LTR English and RTL Arabic running in the same direction, you need to have their “up”’s pointing in the opposite direction. Which is kind of odd and strange and confusing. But well, you can’t have a horizontal script laid out in vertical paragraph without breaching at least some of its properties.