Struct wr_glyph_rasterizer::rasterizer::BaseFontInstance
source · pub struct BaseFontInstance {
pub instance_key: FontInstanceKey,
pub font_key: FontKey,
pub size: FontSize,
pub options: FontInstanceOptions,
pub platform_options: Option<FontInstancePlatformOptions>,
pub variations: Vec<FontVariation>,
}
Expand description
Immutable description of a font instance’s shared state.
BaseFontInstance
can be identified by a FontInstanceKey
to avoid hashing it.
Fields§
§instance_key: FontInstanceKey
§font_key: FontKey
§size: FontSize
§options: FontInstanceOptions
§platform_options: Option<FontInstancePlatformOptions>
§variations: Vec<FontVariation>
Implementations§
source§impl BaseFontInstance
impl BaseFontInstance
pub fn new( instance_key: FontInstanceKey, font_key: FontKey, size: f32, options: Option<FontInstanceOptions>, platform_options: Option<FontInstancePlatformOptions>, variations: Vec<FontVariation>, ) -> Self
Trait Implementations§
source§impl Clone for BaseFontInstance
impl Clone for BaseFontInstance
source§fn clone(&self) -> BaseFontInstance
fn clone(&self) -> BaseFontInstance
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 BaseFontInstance
impl Debug for BaseFontInstance
source§impl Hash for BaseFontInstance
impl Hash for BaseFontInstance
source§impl MallocSizeOf for BaseFontInstance
impl MallocSizeOf for BaseFontInstance
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 Ord for BaseFontInstance
impl Ord for BaseFontInstance
source§fn cmp(&self, other: &BaseFontInstance) -> Ordering
fn cmp(&self, other: &BaseFontInstance) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for BaseFontInstance
impl PartialEq for BaseFontInstance
source§impl PartialOrd for BaseFontInstance
impl PartialOrd for BaseFontInstance
source§impl Serialize for BaseFontInstance
impl Serialize for BaseFontInstance
source§impl Deref for BaseFontInstance
impl Deref for BaseFontInstance
source§type Target = FontInstanceOptions
type Target = FontInstanceOptions
The resulting type after dereferencing.
source§fn deref(&self) -> &FontInstanceOptions
fn deref(&self) -> &FontInstanceOptions
Dereferences the value.
impl Eq for BaseFontInstance
Auto Trait Implementations§
impl Freeze for BaseFontInstance
impl RefUnwindSafe for BaseFontInstance
impl Send for BaseFontInstance
impl Sync for BaseFontInstance
impl Unpin for BaseFontInstance
impl UnwindSafe for BaseFontInstance
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<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