Adjust layout_str to use byte coordinates

* Interpret ranges as byte ranges for incoming runs
* Return glyphs whose indices are byte offsets
This commit is contained in:
Max Brunsfeld
2021-05-20 12:47:08 +02:00
committed by Antonio Scandurra
parent a2c36fcdb7
commit 92b938f4a8
3 changed files with 60 additions and 50 deletions
+1 -1
View File
@@ -2151,7 +2151,7 @@ impl BufferView {
layouts.push(layout_cache.layout_str(
&line,
font_size,
&[(0..line.chars().count(), font_id)],
&[(0..line.len(), font_id)],
));
line.clear();
row += 1;