pub enum OperatingSystem {
Windows,
Linux,
MacOS,
Wasm,
}Expand description
Operating system type for generic font family resolution
Variants§
Implementations§
Source§impl OperatingSystem
impl OperatingSystem
Sourcepub fn get_serif_fonts(&self, unicode_ranges: &[UnicodeRange]) -> Vec<String>
pub fn get_serif_fonts(&self, unicode_ranges: &[UnicodeRange]) -> Vec<String>
Get system-specific fonts for the “serif” generic family Prioritizes fonts based on Unicode range coverage
Sourcepub fn get_sans_serif_fonts(
&self,
unicode_ranges: &[UnicodeRange],
) -> Vec<String>
pub fn get_sans_serif_fonts( &self, unicode_ranges: &[UnicodeRange], ) -> Vec<String>
Get system-specific fonts for the “sans-serif” generic family Prioritizes fonts based on Unicode range coverage
Sourcepub fn get_monospace_fonts(
&self,
unicode_ranges: &[UnicodeRange],
) -> Vec<String>
pub fn get_monospace_fonts( &self, unicode_ranges: &[UnicodeRange], ) -> Vec<String>
Get system-specific fonts for the “monospace” generic family Prioritizes fonts based on Unicode range coverage
Sourcepub fn expand_generic_family(
&self,
family: &str,
unicode_ranges: &[UnicodeRange],
) -> Vec<String>
pub fn expand_generic_family( &self, family: &str, unicode_ranges: &[UnicodeRange], ) -> Vec<String>
Expand a generic CSS font family to system-specific font names Returns the original name if not a generic family Prioritizes fonts based on Unicode range coverage
Trait Implementations§
Source§impl Clone for OperatingSystem
impl Clone for OperatingSystem
Source§fn clone(&self) -> OperatingSystem
fn clone(&self) -> OperatingSystem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OperatingSystem
impl Debug for OperatingSystem
Source§impl Hash for OperatingSystem
impl Hash for OperatingSystem
Source§impl PartialEq for OperatingSystem
impl PartialEq for OperatingSystem
impl Copy for OperatingSystem
impl Eq for OperatingSystem
impl StructuralPartialEq for OperatingSystem
Auto Trait Implementations§
impl Freeze for OperatingSystem
impl RefUnwindSafe for OperatingSystem
impl Send for OperatingSystem
impl Sync for OperatingSystem
impl Unpin for OperatingSystem
impl UnwindSafe for OperatingSystem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more