As I follow up to my last post I will give a short overview what has happened this week and what I will do next:
Itemizing text with respect to format and direction works now, but itemizing on script is still missing. This is not trivial as certain characters don’t have a fixed script value but get it from the surrounding characters.
However I found an example in ICUs “extra” directory and will use this as a base for my own code (or use it unmodified if that works).
Code is available on Github.
I will add line breaking next. This is actually a rather complex task because you need to perform the following steps:
- Shape the text to get actual glyph widths
- Perform line breaking
- Determine characters from glyphs
- Shape again
Also I will try to build some test cases for my code to verify it is working correctly.
Other problems to solve
- Finding font file from font name in a platform independent way
- Working with fontsets (i.e. selecting a different font if the current font doesn’t have all necessary glyphs)