pub struct ResolvedGlyph { /* private fields */ }Expand description
A glyph resolved from a FontChain: the glyph index plus the specific BitmapFont it
came from, since each font in a chain owns its own bitmap data.
Implementations§
Source§impl ResolvedGlyph
impl ResolvedGlyph
Sourcepub const fn font(&self) -> BitmapFont
pub const fn font(&self) -> BitmapFont
The font this glyph was resolved from.
Sourcepub const fn font_index(&self) -> usize
pub const fn font_index(&self) -> usize
The position of font within the chain that resolved it: 0 is the
primary font, 1.. the fallbacks in order.
A GPU backend packs every font in the chain into one atlas and addresses a glyph by a flat
slot, so it needs the font’s position (a stable index into FontChain::fonts) rather
than the font value, which carries no identity of its own.
Sourcepub const fn is_notdef(&self) -> bool
pub const fn is_notdef(&self) -> bool
Whether this is the substituted “no glyph” box rather than a glyph for the character that
was asked for: true when no font in the chain covered that character and
FontChain::resolve fell back to the solid block.
Sourcepub fn rows(&self) -> &[u8] ⓘ
pub fn rows(&self) -> &[u8] ⓘ
Returns the row bytes for this glyph; see BitmapFont::rows.
Trait Implementations§
Source§impl Clone for ResolvedGlyph
impl Clone for ResolvedGlyph
Source§fn clone(&self) -> ResolvedGlyph
fn clone(&self) -> ResolvedGlyph
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResolvedGlyph
impl Debug for ResolvedGlyph
Source§impl PartialEq for ResolvedGlyph
impl PartialEq for ResolvedGlyph
Source§fn eq(&self, other: &ResolvedGlyph) -> bool
fn eq(&self, other: &ResolvedGlyph) -> bool
self and other values to be equal, and is used by ==.impl Copy for ResolvedGlyph
impl Eq for ResolvedGlyph
impl StructuralPartialEq for ResolvedGlyph
Auto Trait Implementations§
impl Freeze for ResolvedGlyph
impl RefUnwindSafe for ResolvedGlyph
impl Send for ResolvedGlyph
impl Sync for ResolvedGlyph
impl Unpin for ResolvedGlyph
impl UnsafeUnpin for ResolvedGlyph
impl UnwindSafe for ResolvedGlyph
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<C> WithAlpha for Cwhere
C: Copy,
impl<C> WithAlpha for Cwhere
C: Copy,
§fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
self with alpha, storing alpha before the color in memory
(see [AlphaFirst]).§fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
self with alpha, storing alpha after the color in memory
(see [AlphaLast]).