Struct read_fonts::tables::bitmap::SmallGlyphMetrics
source · #[repr(C, packed(1))]pub struct SmallGlyphMetrics {
pub height: u8,
pub width: u8,
pub bearing_x: BigEndian<i8>,
pub bearing_y: BigEndian<i8>,
pub advance: u8,
}
Expand description
SmallGlyphMetrics record.
Fields§
§height: u8
Number of rows of data.
width: u8
Number of columns of data.
bearing_x: BigEndian<i8>
Distance in pixels from the horizontal origin to the left edge of the bitmap (for horizontal text); or distance in pixels from the vertical origin to the top edge of the bitmap (for vertical text).
bearing_y: BigEndian<i8>
Distance in pixels from the horizontal origin to the top edge of the bitmap (for horizontal text); or distance in pixels from the vertical origin to the left edge of the bitmap (for vertical text).
advance: u8
Horizontal or vertical advance width in pixels.
Implementations§
source§impl SmallGlyphMetrics
impl SmallGlyphMetrics
sourcepub fn bearing_x(&self) -> i8
pub fn bearing_x(&self) -> i8
Distance in pixels from the horizontal origin to the left edge of the bitmap (for horizontal text); or distance in pixels from the vertical origin to the top edge of the bitmap (for vertical text).
Trait Implementations§
source§impl Clone for SmallGlyphMetrics
impl Clone for SmallGlyphMetrics
source§fn clone(&self) -> SmallGlyphMetrics
fn clone(&self) -> SmallGlyphMetrics
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 SmallGlyphMetrics
impl Debug for SmallGlyphMetrics
source§impl FixedSize for SmallGlyphMetrics
impl FixedSize for SmallGlyphMetrics
source§const RAW_BYTE_LEN: usize = 5usize
const RAW_BYTE_LEN: usize = 5usize
The raw size of this type, in bytes. Read more
source§impl Hash for SmallGlyphMetrics
impl Hash for SmallGlyphMetrics
source§impl Ord for SmallGlyphMetrics
impl Ord for SmallGlyphMetrics
source§fn cmp(&self, other: &SmallGlyphMetrics) -> Ordering
fn cmp(&self, other: &SmallGlyphMetrics) -> 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 SmallGlyphMetrics
impl PartialEq for SmallGlyphMetrics
source§impl PartialOrd for SmallGlyphMetrics
impl PartialOrd for SmallGlyphMetrics
source§impl<'a> SomeRecord<'a> for SmallGlyphMetrics
impl<'a> SomeRecord<'a> for SmallGlyphMetrics
fn traverse(self, data: FontData<'a>) -> RecordResolver<'a>
impl AnyBitPattern for SmallGlyphMetrics
impl Copy for SmallGlyphMetrics
impl Eq for SmallGlyphMetrics
impl StructuralPartialEq for SmallGlyphMetrics
Auto Trait Implementations§
impl Freeze for SmallGlyphMetrics
impl RefUnwindSafe for SmallGlyphMetrics
impl Send for SmallGlyphMetrics
impl Sync for SmallGlyphMetrics
impl Unpin for SmallGlyphMetrics
impl UnwindSafe for SmallGlyphMetrics
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.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
)