mirror of
https://github.com/typst/typst
synced 2025-07-27 14:27:56 +08:00
Use select_fallback
as well
This commit is contained in:
parent
f9862eba8d
commit
c384f6b6c0
@ -7,6 +7,7 @@ use hayro_syntax::page::Page;
|
||||
use hayro_syntax::Pdf;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::sync::Arc;
|
||||
use typst_library::text::FontInfo;
|
||||
|
||||
struct DocumentRepr {
|
||||
pdf: Arc<Pdf>,
|
||||
@ -121,6 +122,9 @@ fn get_standard_fonts(world: Tracked<dyn World + '_>) -> Arc<StandardFonts> {
|
||||
None
|
||||
}
|
||||
})
|
||||
.or_else(|| {
|
||||
book.select_fallback(None, variant, "A")
|
||||
})
|
||||
.and_then(|i| world.font(i))
|
||||
.map(|font| font.data().clone())
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user