Get individual grapheme's width

This commit is contained in:
Joscha 2022-05-28 11:15:18 +02:00
parent 833defd1ce
commit 3b2ea37ba5
3 changed files with 32 additions and 6 deletions

View file

@ -141,7 +141,7 @@ impl Buffer {
let y = pos.y as u16;
for grapheme in content.graphemes(true) {
let width = widthdb.width(grapheme);
let width = widthdb.grapheme_width(grapheme);
self.write_grapheme(pos.x, y, width, grapheme, style);
pos.x += width as i32;
}