We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb1ef78 commit 77d2946Copy full SHA for 77d2946
plotters/src/element/text.rs
@@ -165,6 +165,7 @@ fn layout_multiline_text<'a, F: FnMut(&'a str)>(
165
}
166
167
#[cfg(test)]
168
+#[cfg(ttf)]
169
#[test]
170
fn test_multi_layout() {
171
use plotters_backend::{FontFamily, FontStyle};
@@ -177,7 +178,9 @@ fn test_multi_layout() {
177
178
});
179
180
let font = FontDesc::new(FontFamily::SansSerif, 20 as f64, FontStyle::Bold);
- layout_multiline_text("öä", 40, font, |txt| {
181
+ layout_multiline_text("öä", 100, font, |txt| {
182
+ // This does not divide the line, but still crashed in the previous implementation
183
+ // of layout_multiline_text. So this test should be reliable
184
println!("Got: {}", txt);
185
assert_eq!(txt, "öä")
186
0 commit comments