pub struct SystemFontSource { /* private fields */ }Expand description
The engine’s font manager: the platform’s installed fonts through a FontManager, and
the two family names Flutter’s engine defines for the platform’s own user-interface font.
CupertinoSystemText is that font at text sizes and CupertinoSystemDisplay at display
sizes, each answered with every weight the platform has, as the engine registers them
(txt/platform_mac.mm: the display face at its 29-point breakpoint, the text face by
the default fallback). Every other family, and character fallback, goes to the manager.
Implementations§
Source§impl SystemFontSource
impl SystemFontSource
Sourcepub fn new(manager: Box<dyn FontManager>) -> SystemFontSource
pub fn new(manager: Box<dyn FontManager>) -> SystemFontSource
Over manager: a host’s own lookup, or one that answers across a boundary.
Sourcepub fn platform() -> SystemFontSource
pub fn platform() -> SystemFontSource
Over this platform’s own font manager.
Sourcepub fn set_locales(&mut self, locales: Vec<String>)
pub fn set_locales(&mut self, locales: Vec<String>)
The languages character fallback prefers, BCP 47, most preferred first (Flutter’s
PlatformDispatcher.locales).
Trait Implementations§
Source§impl FontSource for SystemFontSource
impl FontSource for SystemFontSource
Auto Trait Implementations§
impl !RefUnwindSafe for SystemFontSource
impl !Sync for SystemFontSource
impl !UnwindSafe for SystemFontSource
impl Freeze for SystemFontSource
impl Send for SystemFontSource
impl Unpin for SystemFontSource
impl UnsafeUnpin for SystemFontSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more