pub struct BitmapGlyph<'a> {
pub data: BitmapData<'a>,
pub bearing_x: f32,
pub bearing_y: f32,
pub inner_bearing_x: f32,
pub inner_bearing_y: f32,
pub ppem_x: f32,
pub ppem_y: f32,
pub advance: Option<f32>,
pub width: u32,
pub height: u32,
pub placement_origin: Origin,
}
Expand description
An embedded bitmap glyph.
Fields§
§data: BitmapData<'a>
The underlying data of the bitmap glyph.
bearing_x: f32
Outer glyph bearings in the x direction, given in font units.
bearing_y: f32
Outer glyph bearings in the y direction, given in font units.
inner_bearing_x: f32
Inner glyph bearings in the x direction, given in pixels. This value should be scaled
by ppem_*
and be applied as an offset when placing the image within the bounds rectangle.
inner_bearing_y: f32
Inner glyph bearings in the y direction, given in pixels. This value should be scaled
by ppem_*
and be applied as an offset when placing the image within the bounds rectangle.
ppem_x: f32
The assumed pixels-per-em in the x direction.
ppem_y: f32
The assumed pixels-per-em in the y direction.
advance: Option<f32>
The horizontal advance width of the bitmap glyph in pixels, if given.
width: u32
The number of columns in the bitmap.
height: u32
The number of rows in the bitmap.
placement_origin: Origin
The placement origin of the bitmap.
Implementations§
Source§impl<'a> BitmapGlyph<'a>
impl<'a> BitmapGlyph<'a>
fn from_bdt( bitmap_size: &BitmapSize, bitmap_data: &BitmapData<'a>, ) -> Option<Self>
Trait Implementations§
Source§impl<'a> Clone for BitmapGlyph<'a>
impl<'a> Clone for BitmapGlyph<'a>
Source§fn clone(&self) -> BitmapGlyph<'a>
fn clone(&self) -> BitmapGlyph<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more