pub trait FontSource {
// Required methods
fn family(&mut self, name: &str) -> Vec<Font>;
fn face_for_codepoint(
&mut self,
codepoint: char,
attrs: FontAttrs,
) -> Option<Font>;
}Expand description
Somewhere fonts can come FROM when the collection lacks them — the
pluggable half of the demand loop. Implementations only
locate and parse (an installed-fonts scan today; a platform-native
CoreText/DirectWrite lookup can replace it without touching policy);
the growth policy itself lives in FaceSet::grown_by.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".