suragch / mongol

Mongolian vertical script widgets for Flutter apps
https://pub.dev/packages/mongol
BSD 3-Clause "New" or "Revised" License
71 stars 15 forks source link

Japanese punctuation marks and numerals are rotated like English characters #43

Open bananowysong opened 1 year ago

bananowysong commented 1 year ago

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

suragch commented 1 year ago

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

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.