mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Fix linebreak fallback tofu (#3123)
This commit is contained in:
parent
155af2318e
commit
28a5069f95
@ -93,8 +93,8 @@ impl FontBook {
|
|||||||
variant: FontVariant,
|
variant: FontVariant,
|
||||||
text: &str,
|
text: &str,
|
||||||
) -> Option<usize> {
|
) -> Option<usize> {
|
||||||
// Find the fonts that contain the text's first char ...
|
// Find the fonts that contain the text's first non-space char ...
|
||||||
let c = text.chars().next()?;
|
let c = text.chars().find(|c| !c.is_whitespace())?;
|
||||||
let ids = self
|
let ids = self
|
||||||
.infos
|
.infos
|
||||||
.iter()
|
.iter()
|
||||||
|
BIN
tests/ref/bugs/2105-linebreak-tofu.png
Normal file
BIN
tests/ref/bugs/2105-linebreak-tofu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 473 B |
1
tests/typ/bugs/2105-linebreak-tofu.typ
Normal file
1
tests/typ/bugs/2105-linebreak-tofu.typ
Normal file
@ -0,0 +1 @@
|
|||||||
|
#linebreak()中文
|
Loading…
x
Reference in New Issue
Block a user