Don't do font fallback for unshapable newlines
This commit is contained in:
parent
43e30717ab
commit
cd7630415f
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user