pub struct Sbix<'a> {
data: FontData<'a>,
num_glyphs: u16,
}Expand description
The sbix (Standard Bitmap Graphics) table
Fields§
§data: FontData<'a>§num_glyphs: u16Implementations§
Source§impl<'a> Sbix<'a>
impl<'a> Sbix<'a>
pub const MIN_SIZE: usize
Sourcepub fn resolve_offset<O: Offset, R: FontRead<'a>>(
&self,
offset: O,
) -> Result<R, ReadError>
pub fn resolve_offset<O: Offset, R: FontRead<'a>>( &self, offset: O, ) -> Result<R, ReadError>
Resolve the provided offset from the start of this table.
Sourcepub fn offset_data(&self) -> FontData<'a>
pub fn offset_data(&self) -> FontData<'a>
Return a reference to this table’s raw data.
We use this in the compile crate to resolve offsets.
Sourcepub fn shape(&self) -> &Self
👎Deprecated: just use the base type directly
pub fn shape(&self) -> &Self
Return a reference to the table’s ‘Shape’ struct.
This is a low level implementation detail, but it can be useful in some cases where you want to know things about a table’s layout, such as the byte offsets of specific fields.
Sourcepub fn flags(&self) -> HeaderFlags
pub fn flags(&self) -> HeaderFlags
Bit 0: Set to 1. Bit 1: Draw outlines. Bits 2 to 15: reserved (set to 0).
Sourcepub fn num_strikes(&self) -> u32
pub fn num_strikes(&self) -> u32
Number of bitmap strikes.
Sourcepub fn strike_offsets(&self) -> &'a [BigEndian<Offset32>]
pub fn strike_offsets(&self) -> &'a [BigEndian<Offset32>]
Offsets from the beginning of the ‘sbix’ table to data for each individual bitmap strike.
Sourcepub fn strikes(&self) -> ArrayOfOffsets<'a, Strike<'a>, Offset32>
pub fn strikes(&self) -> ArrayOfOffsets<'a, Strike<'a>, Offset32>
A dynamically resolving wrapper for strike_offsets.
pub(crate) fn num_glyphs(&self) -> u16
pub fn version_byte_range(&self) -> Range<usize> ⓘ
pub fn flags_byte_range(&self) -> Range<usize> ⓘ
pub fn num_strikes_byte_range(&self) -> Range<usize> ⓘ
pub fn strike_offsets_byte_range(&self) -> Range<usize> ⓘ
Trait Implementations§
Source§impl<'a> FontReadWithArgs<'a> for Sbix<'a>
impl<'a> FontReadWithArgs<'a> for Sbix<'a>
Source§impl<'a> MinByteRange<'a> for Sbix<'a>
impl<'a> MinByteRange<'a> for Sbix<'a>
Auto Trait Implementations§
impl<'a> Freeze for Sbix<'a>
impl<'a> RefUnwindSafe for Sbix<'a>
impl<'a> Send for Sbix<'a>
impl<'a> Sync for Sbix<'a>
impl<'a> Unpin for Sbix<'a>
impl<'a> UnsafeUnpin for Sbix<'a>
impl<'a> UnwindSafe for Sbix<'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