pub struct WgpuTextSystem { /* private fields */ }Expand description
The fonts a WgpuRenderer hands the app its text
lays out and draws with.
Implementations§
Source§impl WgpuTextSystem
impl WgpuTextSystem
Sourcepub fn from_fonts(fonts: &[&'static [u8]]) -> Self
pub fn from_fonts(fonts: &[&'static [u8]]) -> Self
Parses fonts, font file bytes ordered by priority with the first highest, into a text
system. Files that do not parse are skipped. When none parses, the text system holds the
embedded default font if the build has it, and no font otherwise.
Sourcepub fn from_text_fonts(fonts: TextFonts) -> Self
pub fn from_text_fonts(fonts: TextFonts) -> Self
Adopt fonts an app already built, the path app-supplied families take, where faces were parsed once at startup rather than from static byte slices here.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WgpuTextSystem
impl !UnwindSafe for WgpuTextSystem
impl Forget for WgpuTextSystem
impl Freeze for WgpuTextSystem
impl Move for WgpuTextSystem
impl Send for WgpuTextSystem
impl Sync for WgpuTextSystem
impl Unpin for WgpuTextSystem
impl UnsafeUnpin for WgpuTextSystem
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