pub struct BitmapStrikes<'a> {
font: &'a Font,
kind: Kind<'a>,
}Expand description
The bitmap strikes of a font, read from a single table.
Cheap to create and copy. It borrows tables that the font has already parsed.
Fields§
§font: &'a Font§kind: Kind<'a>Implementations§
Source§impl<'a> BitmapStrikes<'a>
impl<'a> BitmapStrikes<'a>
Sourcepub fn source(&self) -> Option<BitmapSource>
pub fn source(&self) -> Option<BitmapSource>
Returns the table that provides the bitmaps, or None if the font has
none of the requested sources.
Sourcepub fn iter(&self) -> impl Iterator<Item = Strike<'a>> + 'a
pub fn iter(&self) -> impl Iterator<Item = Strike<'a>> + 'a
Returns an iterator over the strikes, in index order.
Sourcepub fn select(&self, ppem: Option<f32>) -> Option<Strike<'a>>
pub fn select(&self, ppem: Option<f32>) -> Option<Strike<'a>>
Returns the strike for ppem.
This is the smallest strike that is at least ppem, or the largest
strike if none is that large. None or a size that is not positive
selects the largest strike.
Sourcepub fn select_bitmap(
&self,
glyph: GlyphId,
ppem: Option<f32>,
) -> Option<BitmapGlyph<'a>>
pub fn select_bitmap( &self, glyph: GlyphId, ppem: Option<f32>, ) -> Option<BitmapGlyph<'a>>
Trait Implementations§
Source§impl<'a> Clone for BitmapStrikes<'a>
impl<'a> Clone for BitmapStrikes<'a>
Source§fn clone(&self) -> BitmapStrikes<'a>
fn clone(&self) -> BitmapStrikes<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for BitmapStrikes<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for BitmapStrikes<'a>
impl<'a> !UnwindSafe for BitmapStrikes<'a>
impl<'a> Freeze for BitmapStrikes<'a>
impl<'a> Send for BitmapStrikes<'a>
impl<'a> Sync for BitmapStrikes<'a>
impl<'a> Unpin for BitmapStrikes<'a>
impl<'a> UnsafeUnpin for BitmapStrikes<'a>
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