3 ms·
Modern horizontal hiragana and katakana are not complex or huge scripts, there are several dozen base characters (of one or two different widths) and two or so
by mananaysiempre 4y ago
Modern horizontal hiragana and katakana are not complex or huge scripts, there are several dozen base characters (of one or two different widths) and two or so accent marks. There might be no spaces, you break lines whenever they run out without considering word boundaries. I expect anything capable of dealing with Latin should be able to handle this, and it hardly deserves the name of "shaping".
(Adding kanji into the mix somewhat complicates matters, as there are so many potential characters you cannot just blindly cache the rasterization of every one of them and never throw any away, but that's also not the degree of complexity you get from Arabic and such.)
- amichal 4y agoLine layout rules are a bit complex. Long long ago when i was 19 someone handed me a photocopied set of around 50 rules for line breaking Japanese text and followed them to implement our first draft of it in a text layout program we were adding Japanese support to. I implemented it blind, I dont speak Japanese , it never shipped and I dont remember the rules but i do remember quite some complexity around punctuation etc. This section from W3C covers some of what I remember and quite a bit more I'm sure https://www.w3.org/TR/jlreq/#line_composition_rules_for_punctuation_marks https://www.w3.org/TR/jlreq/#line_composition_rules_for_punc...
- brigandish 4y agoIn my experience, Japanese often gets broken at the page width, regardless of any other consideration. It makes reading, for a learner like me, a pain, as you have to read ahead on the next line to be sure you’ve got all the characters.
- Arnavion 4y ago>there are several dozen base characters (of one or two different widths) and two or so accent marks. There might be no spaces, you break lines whenever they run out without considering word boundaries. You're forgeting about small kana which can be arbitrarily appended to the big kana. Regular words only have one or two small kana after a big kana, but technically there can be arbitrarily many. Either way, they affect word-breaking.