We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8f567c commit 4fe90bbCopy full SHA for 4fe90bb
src/shape.rs
@@ -458,12 +458,12 @@ fn shape_skip(
458
459
glyphs.extend(
460
line[start_run..end_run]
461
- .chars()
+ .char_indices()
462
.enumerate()
463
- .map(|(i, codepoint)| {
+ .map(|(i, (chr_idx, codepoint))| {
464
let glyph_id = charmap.map(codepoint);
465
let x_advance = glyph_metrics.advance_width(glyph_id);
466
- let attrs = attrs_list.get_span(i);
+ let attrs = attrs_list.get_span(start_run + chr_idx);
467
468
ShapeGlyph {
469
start: i,
0 commit comments