GlyphBitmapData

Enum GlyphBitmapData 

Source
pub enum GlyphBitmapData<'a> {
    Format1 {
        small_metrics: SmallGlyphMetrics,
        data: &'a [u8],
    },
    Format2 {
        small_metrics: SmallGlyphMetrics,
        data: &'a [u8],
    },
    Format5 {
        big_metrics: BigGlyphMetrics,
        data: &'a [u8],
    },
    Format6 {
        big_metrics: BigGlyphMetrics,
        data: &'a [u8],
    },
    Format7 {
        big_metrics: BigGlyphMetrics,
        data: &'a [u8],
    },
    Format8 {
        small_metrics: SmallGlyphMetrics,
        components: ReadArray<'a, EbdtComponent>,
    },
    Format9 {
        big_metrics: BigGlyphMetrics,
        components: ReadArray<'a, EbdtComponent>,
    },
    Format17 {
        small_metrics: SmallGlyphMetrics,
        data: &'a [u8],
    },
    Format18 {
        big_metrics: BigGlyphMetrics,
        data: &'a [u8],
    },
    Format19 {
        big_metrics: BigGlyphMetrics,
        data: &'a [u8],
    },
}
Expand description

Record corresponding to data read from CBDT.

Variants§

§

Format1

Format 1: small metrics, byte-aligned data.

Fields

§small_metrics: SmallGlyphMetrics

Metrics information for the glyph.

§data: &'a [u8]

Byte-aligned bitmap data.

§

Format2

Format 2: small metrics, bit-aligned data.

Fields

§small_metrics: SmallGlyphMetrics

Metrics information for the glyph.

§data: &'a [u8]

Bit-aligned bitmap data.

§

Format5

Format 5: metrics in EBLC, bit-aligned image data only.

Fields

§big_metrics: BigGlyphMetrics

Metrics information for the glyph.

§data: &'a [u8]

Bit-aligned bitmap data.

§

Format6

Format 6: big metrics, byte-aligned data.

Fields

§big_metrics: BigGlyphMetrics

Metrics information for the glyph.

§data: &'a [u8]

Byte-aligned bitmap data.

§

Format7

Format7: big metrics, bit-aligned data.

Fields

§big_metrics: BigGlyphMetrics

Metrics information for the glyph.

§data: &'a [u8]

Bit-aligned bitmap data.

§

Format8

Format 8: small metrics, component data.

Fields

§small_metrics: SmallGlyphMetrics

Metrics information for the glyph.

§components: ReadArray<'a, EbdtComponent>

Array of EbdtComponent records.

§

Format9

Format 9: big metrics, component data.

Fields

§big_metrics: BigGlyphMetrics

Metrics information for the glyph.

§components: ReadArray<'a, EbdtComponent>

Array of EbdtComponent records.

§

Format17

Format 17: small metrics, PNG image data.

Fields

§small_metrics: SmallGlyphMetrics

Metrics information for the glyph.

§data: &'a [u8]

Raw PNG data

§

Format18

Format 18: big metrics, PNG image data.

Fields

§big_metrics: BigGlyphMetrics

Metrics information for the glyph.

§data: &'a [u8]

Raw PNG data

§

Format19

Format 19: metrics in CBLC table, PNG image data.

Fields

§big_metrics: BigGlyphMetrics

Metrics information for the glyph.

§data: &'a [u8]

Raw PNG data

Implementations§

Source§

impl<'a> GlyphBitmapData<'a>

Source

pub fn width(&self) -> u8

The width of the bitmap.

Source

pub fn height(&self) -> u8

The height of the bitmap.

Trait Implementations§

Source§

impl<'a> Debug for GlyphBitmapData<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for GlyphBitmapData<'a>

§

impl<'a> RefUnwindSafe for GlyphBitmapData<'a>

§

impl<'a> Send for GlyphBitmapData<'a>

§

impl<'a> Sync for GlyphBitmapData<'a>

§

impl<'a> Unpin for GlyphBitmapData<'a>

§

impl<'a> UnwindSafe for GlyphBitmapData<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.