Skip to content

Commit fd87ad9

Browse files
committed
Added comments
1 parent e98bd15 commit fd87ad9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plotters/src/element/text.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ impl<'a, Coord, T: Borrow<str>> MultiLineText<'a, Coord, T> {
116116
}
117117
}
118118

119+
120+
// Rewrite of the layout function for multiline-text. It crashes when UTF-8 is used
121+
// instead of ASCII. Solution taken from:
122+
// https://stackoverflow.com/questions/68122526/splitting-a-utf-8-string-into-chunks
123+
// and modified for our purposes.
119124
fn layout_multiline_text<'a, F: FnMut(&'a str)>(
120125
text: &'a str,
121126
max_width: u32,

0 commit comments

Comments
 (0)