pub type FallbackSelectionFn<'a> = Box<dyn Fn(char, &[ID], &mut Arc<Database>) -> Option<ID> + Send + Sync + 'a>;
Expand description
A shorthand for FontResolver’s fallback selection function.
This function receives a specific character, a list of already used fonts, and a font database. It should return the ID of a font that
- is not any of the already used fonts
- is as close as possible to the first already used font (if any)
- supports the given character
The function can search the existing database, but can also load additional
fonts dynamically. See the documentation of FontSelectionFn
for more
details.
Aliased Type§
pub struct FallbackSelectionFn<'a>(/* private fields */);