mirror of
https://github.com/typst/typst
synced 2025-05-18 11:05:28 +08:00
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,
|
dir: Dir,
|
||||||
tags: &[rustybuzz::Feature],
|
tags: &[rustybuzz::Feature],
|
||||||
) {
|
) {
|
||||||
|
// No font has newlines.
|
||||||
|
if text.chars().all(|c| c == '\n') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Select the font family.
|
// Select the font family.
|
||||||
let (face_id, fallback) = loop {
|
let (face_id, fallback) = loop {
|
||||||
// Try to load the next available font family.
|
// Try to load the next available font family.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user