#[repr(u32)]pub enum GenericFontFamily {
None = 0,
Serif = 1,
SansSerif = 2,
Monospace = 3,
Cursive = 4,
Fantasy = 5,
SystemUi = 6,
}
Expand description
A generic font-family name.
The order here is important, if you change it make sure that
gfxPlatformFontList.h
s ranged array and gfxFontFamilyList
’s
sSingleGenerics are updated as well.
NOTE(emilio): Should be u8, but it’s a u32 because of ABI issues between GCC and LLVM see https://bugs.llvm.org/show_bug.cgi?id=44228 / bug 1600735 / bug 1726515.
Variants§
None = 0
No generic family specified, only for internal usage.
NOTE(emilio): Gecko code relies on this variant being zero.
Serif = 1
SansSerif = 2
Monospace = 3
Cursive = 4
Fantasy = 5
SystemUi = 6
Implementations§
source§impl GenericFontFamily
impl GenericFontFamily
sourcepub(crate) fn valid_for_user_font_prioritization(self) -> bool
pub(crate) fn valid_for_user_font_prioritization(self) -> bool
When we disallow websites to override fonts, we ignore some generic families that the website might specify, since they’re not configured by the user. See bug 789788 and bug 1730098.
Trait Implementations§
source§impl Clone for GenericFontFamily
impl Clone for GenericFontFamily
source§fn clone(&self) -> GenericFontFamily
fn clone(&self) -> GenericFontFamily
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 GenericFontFamily
impl Debug for GenericFontFamily
source§impl<'de> Deserialize<'de> for GenericFontFamily
impl<'de> Deserialize<'de> for GenericFontFamily
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 GenericFontFamily
impl Hash for GenericFontFamily
source§impl MallocSizeOf for GenericFontFamily
impl MallocSizeOf for GenericFontFamily
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl Parse for GenericFontFamily
impl Parse for GenericFontFamily
source§fn parse<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parse a value of this type. Read more
source§impl PartialEq for GenericFontFamily
impl PartialEq for GenericFontFamily
source§fn eq(&self, other: &GenericFontFamily) -> bool
fn eq(&self, other: &GenericFontFamily) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for GenericFontFamily
impl Serialize for GenericFontFamily
source§impl ToComputedValue for GenericFontFamily
impl ToComputedValue for GenericFontFamily
§type ComputedValue = GenericFontFamily
type ComputedValue = GenericFontFamily
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 ToCss for GenericFontFamily
impl ToCss for GenericFontFamily
source§impl ToResolvedValue for GenericFontFamily
impl ToResolvedValue for GenericFontFamily
§type ResolvedValue = GenericFontFamily
type ResolvedValue = GenericFontFamily
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 GenericFontFamily
impl ToShmem for GenericFontFamily
impl Copy for GenericFontFamily
impl Eq for GenericFontFamily
impl StructuralPartialEq for GenericFontFamily
Auto Trait Implementations§
impl Freeze for GenericFontFamily
impl RefUnwindSafe for GenericFontFamily
impl Send for GenericFontFamily
impl Sync for GenericFontFamily
impl Unpin for GenericFontFamily
impl UnwindSafe for GenericFontFamily
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<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