pub struct FontLibraryBuilder { /* private fields */ }
Expand description
Builder for configuring a font library.
Implementations§
Source§impl FontLibraryBuilder
impl FontLibraryBuilder
Sourcepub fn all_names(&mut self, yes: bool) -> &mut Self
pub fn all_names(&mut self, yes: bool) -> &mut Self
Specifies whether all localized family names should be included in the context.
Sourcepub fn add_dir(&mut self, path: impl AsRef<Path>) -> &mut Self
pub fn add_dir(&mut self, path: impl AsRef<Path>) -> &mut Self
Adds fonts from the specified directory to the library.
Sourcepub fn add_file(&mut self, path: impl AsRef<Path>) -> &mut Self
pub fn add_file(&mut self, path: impl AsRef<Path>) -> &mut Self
Adds a font file to the library.
Sourcepub fn add_system_fonts(&mut self) -> &mut Self
pub fn add_system_fonts(&mut self) -> &mut Self
Adds system fonts to the library.
Sourcepub fn add_user_fonts(&mut self) -> &mut Self
pub fn add_user_fonts(&mut self) -> &mut Self
Adds user fonts to the library.
Sourcepub fn map_generic_families(&mut self, yes: bool) -> &mut Self
pub fn map_generic_families(&mut self, yes: bool) -> &mut Self
Specifies whether default generic families should be mapped for the current platform.
Sourcepub fn map_fallbacks(&mut self, yes: bool) -> &mut Self
pub fn map_fallbacks(&mut self, yes: bool) -> &mut Self
Specifies whether default fallbacks should be mapped for the current platform.
Sourcepub fn build(&mut self) -> FontLibrary
pub fn build(&mut self) -> FontLibrary
Builds a library for the current configuration.
Trait Implementations§
Source§impl Default for FontLibraryBuilder
impl Default for FontLibraryBuilder
Source§fn default() -> FontLibraryBuilder
fn default() -> FontLibraryBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FontLibraryBuilder
impl RefUnwindSafe for FontLibraryBuilder
impl Send for FontLibraryBuilder
impl Sync for FontLibraryBuilder
impl Unpin for FontLibraryBuilder
impl UnwindSafe for FontLibraryBuilder
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