Don't do font fallback for unshapable newlines

This commit is contained in:
Laurenz 2022-01-17 16:48:16 +01:00
parent 43e30717ab
commit cd7630415f

View File

@ -426,6 +426,11 @@ fn shape_segment<'a>(
dir: Dir,
tags: &[rustybuzz::Feature],
) {
// No font has newlines.
if text.chars().all(|c| c == '\n') {
return;
}
// Select the font family.
let (face_id, fallback) = loop {
// Try to load the next available font family.