Fix linebreak fallback tofu (#3123)

This commit is contained in:
Wenzhuo Liu 2024-01-03 17:41:41 +08:00 committed by GitHub
parent 155af2318e
commit 28a5069f95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -93,8 +93,8 @@ impl FontBook {
variant: FontVariant,
text: &str,
) -> Option<usize> {
// Find the fonts that contain the text's first char ...
let c = text.chars().next()?;
// Find the fonts that contain the text's first non-space char ...
let c = text.chars().find(|c| !c.is_whitespace())?;
let ids = self
.infos
.iter()

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

View File

@ -0,0 +1 @@
#linebreak()中文