pub struct EmbeddedMetrics {
pub ppem_x: u8,
pub ppem_y: u8,
/* private fields */
}Expand description
Metrics embedded alongside the bitmap.
One or both of the horizontal or vertical metrics with always be present.
Fields§
§ppem_x: u8Horizontal pixels per em.
ppem_y: u8Vertical pixels per em.
Implementations§
Source§impl EmbeddedMetrics
impl EmbeddedMetrics
Sourcepub fn hori(&self) -> Option<&BitmapMetrics>
pub fn hori(&self) -> Option<&BitmapMetrics>
Metrics for horizontal layout.
Sourcepub fn vert(&self) -> Option<&BitmapMetrics>
pub fn vert(&self) -> Option<&BitmapMetrics>
Metrics for vertical layout.
Trait Implementations§
Source§impl Debug for EmbeddedMetrics
impl Debug for EmbeddedMetrics
Source§impl TryFrom<(&BitmapInfo, &BigGlyphMetrics)> for EmbeddedMetrics
impl TryFrom<(&BitmapInfo, &BigGlyphMetrics)> for EmbeddedMetrics
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Source§fn try_from(
(info, big_metrics): (&BitmapInfo, &BigGlyphMetrics),
) -> Result<Self, Self::Error>
fn try_from( (info, big_metrics): (&BitmapInfo, &BigGlyphMetrics), ) -> Result<Self, Self::Error>
Performs the conversion.
Source§impl TryFrom<(&BitmapInfo, &SmallGlyphMetrics)> for EmbeddedMetrics
impl TryFrom<(&BitmapInfo, &SmallGlyphMetrics)> for EmbeddedMetrics
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Source§fn try_from(
(info, small_metrics): (&BitmapInfo, &SmallGlyphMetrics),
) -> Result<Self, Self::Error>
fn try_from( (info, small_metrics): (&BitmapInfo, &SmallGlyphMetrics), ) -> Result<Self, Self::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for EmbeddedMetrics
impl RefUnwindSafe for EmbeddedMetrics
impl Send for EmbeddedMetrics
impl Sync for EmbeddedMetrics
impl Unpin for EmbeddedMetrics
impl UnwindSafe for EmbeddedMetrics
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> 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