mongol icon indicating copy to clipboard operation
mongol copied to clipboard

Japanese punctuation marks and numerals are rotated like English characters

Open bananowysong opened this issue 1 year ago • 1 comments

Expected behavior ?、! and 1234567890 should be rotated like other Japanese characters like kanji, hiragana, and katakana. Instead, they behave like English characters.

By the way, awsome work.

Mongol version: mongol: ^3.0.2

bananowysong avatar Mar 10 '23 09:03 bananowysong

Thank you for posting the issue. The rotation code is handled here:

  • https://github.com/suragch/mongol/blob/master/lib/src/base/mongol_paragraph.dart#L1156

The numbers should be easy enough to fix. The punctuation we should look at a little more carefully. Some fonts rotates the punctuation themselves. If we change the behavior, this could potentially break some currently working apps.

It might also be nice to allow developers to manually rotate specific characters. I'm not sure exactly what that would look like for the API, though. Maybe wrapping the character in a custom TextSpan.

suragch avatar Mar 14 '23 06:03 suragch