Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Just so you have an idea for how a typical text-rendering pipeline works, here’s a quick sketch:

1. Styling (parse markup, query system for fonts)

2. Layout (break text into lines)

3. Shaping (compute the glyphs in a line and their positions)

4. Rasterization (rasterize needed glyphs into an atlas/cache)

5. Composition (copy glyphs from the atlas to their desired positions)

Why is layout done so early? It seems to me that that would be later in the process.





An example: the text "Hello There إلا بسم الله Beep Boop!!" should turn into two visual lines as follows if it is line-wrapped:

    Hello There إلا
    بسم الله Beep Boop!!
Notice how "إلا" goes from the fifth word (from left to right) to the third after the line wrap. This won't work if shaping happens before line wrapping.

Is this the case if all the text is in Arabic? Or if all the text was in Arabic, could layout be done after shaping?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: