




So for Chinese, Japanese, emoji, full-width symbol characters, each of them takes up spaces twice than English letters.
However, with egg-mode-text 1.15.0 and the test code as below:
fn main() {
println!("{}", egg_mode_text::character_count("hello", 23, 23));
println!("{}", egg_mode_text::character_count("你好!", 23, 23));
println!("{}", egg_mode_text::character_count("おはよう", 23, 23));
println!("{}", egg_mode_text::character_count("🌞", 23, 23));
}
It prints out
, which should be 5, 6, 8, 2 instead.
So for Chinese, Japanese, emoji, full-width symbol characters, each of them takes up spaces twice than English letters.
However, with egg-mode-text 1.15.0 and the test code as below:
It prints out
, which should be
5, 6, 8, 2instead.