#[repr(C)]pub struct FontFamilyList {
pub list: ArcSlice<SingleFontFamily>,
}
Expand description
A list of font families.
Fields§
§list: ArcSlice<SingleFontFamily>
The actual list of font families specified.
Implementations§
source§impl FontFamilyList
impl FontFamilyList
sourcepub fn iter(&self) -> impl Iterator<Item = &SingleFontFamily>
pub fn iter(&self) -> impl Iterator<Item = &SingleFontFamily>
Return iterator of SingleFontFamily
sourcepub(crate) fn prioritize_first_generic_or_prepend(
&mut self,
generic: GenericFontFamily,
)
pub(crate) fn prioritize_first_generic_or_prepend( &mut self, generic: GenericFontFamily, )
If there’s a generic font family on the list which is suitable for user font prioritization, then move it ahead of the other families in the list, except for any families known to be ligature-based icon fonts, where using a generic instead of the site’s specified font may cause substantial breakage. If no suitable generic is found in the list, insert the default generic ahead of all the listed families except for known ligature-based icon fonts.
sourcepub(crate) fn needs_user_font_prioritization(&self) -> bool
pub(crate) fn needs_user_font_prioritization(&self) -> bool
Returns whether we need to prioritize user fonts.
sourcepub fn single_generic(&self) -> Option<GenericFontFamily>
pub fn single_generic(&self) -> Option<GenericFontFamily>
Return the generic ID if it is a single generic font
Trait Implementations§
source§impl Clone for FontFamilyList
impl Clone for FontFamilyList
source§fn clone(&self) -> FontFamilyList
fn clone(&self) -> FontFamilyList
Returns a copy 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 FontFamilyList
impl Debug for FontFamilyList
source§impl<'de> Deserialize<'de> for FontFamilyList
impl<'de> Deserialize<'de> for FontFamilyList
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for FontFamilyList
impl Hash for FontFamilyList
source§impl PartialEq for FontFamilyList
impl PartialEq for FontFamilyList
source§impl Serialize for FontFamilyList
impl Serialize for FontFamilyList
source§impl ToComputedValue for FontFamilyList
impl ToComputedValue for FontFamilyList
source§type ComputedValue = FontFamilyList
type ComputedValue = FontFamilyList
The computed value type we’re going to be converted to.
source§fn from_computed_value(from: &Self::ComputedValue) -> Self
fn from_computed_value(from: &Self::ComputedValue) -> Self
Convert a computed value to specified value form. Read more
source§fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
Convert a specified value to a computed value, using itself and the data
inside the
Context
.source§impl ToResolvedValue for FontFamilyList
impl ToResolvedValue for FontFamilyList
source§type ResolvedValue = FontFamilyList
type ResolvedValue = FontFamilyList
The resolved value type we’re going to be converted to.
source§fn from_resolved_value(from: Self::ResolvedValue) -> Self
fn from_resolved_value(from: Self::ResolvedValue) -> Self
Convert a resolved value to resolved value form.
source§fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
Convert a resolved value to a resolved value.
source§impl ToShmem for FontFamilyList
impl ToShmem for FontFamilyList
impl Eq for FontFamilyList
impl StructuralPartialEq for FontFamilyList
Auto Trait Implementations§
impl Freeze for FontFamilyList
impl RefUnwindSafe for FontFamilyList
impl Send for FontFamilyList
impl Sync for FontFamilyList
impl Unpin for FontFamilyList
impl UnwindSafe for FontFamilyList
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert