Struct read_fonts::tables::bitmap::BitmapSize
source · #[repr(C, packed(1))]pub struct BitmapSize {
pub index_subtable_array_offset: BigEndian<u32>,
pub index_tables_size: BigEndian<u32>,
pub number_of_index_subtables: BigEndian<u32>,
pub color_ref: BigEndian<u32>,
pub hori: SbitLineMetrics,
pub vert: SbitLineMetrics,
pub start_glyph_index: BigEndian<GlyphId16>,
pub end_glyph_index: BigEndian<GlyphId16>,
pub ppem_x: u8,
pub ppem_y: u8,
pub bit_depth: u8,
pub flags: BigEndian<BitmapFlags>,
}
Expand description
BitmapSize record.
Fields§
§index_subtable_array_offset: BigEndian<u32>
Offset to index subtable from beginning of EBLC/CBLC.
index_tables_size: BigEndian<u32>
Number of bytes in corresponding index subtables and array.
number_of_index_subtables: BigEndian<u32>
There is an index subtable for each range or format change.
color_ref: BigEndian<u32>
Not used; set to 0.
hori: SbitLineMetrics
Line metrics for text rendered horizontally.
vert: SbitLineMetrics
Line metrics for text rendered vertically.
start_glyph_index: BigEndian<GlyphId16>
Lowest glyph index for this size.
end_glyph_index: BigEndian<GlyphId16>
Highest glyph index for this size.
ppem_x: u8
Horizontal pixels per em.
ppem_y: u8
Vertical pixels per em.
bit_depth: u8
The Microsoft rasterizer v.1.7 or greater supports the following bitDepth values, as described below: 1, 2, 4, and 8 (and 32 for CBLC).
flags: BigEndian<BitmapFlags>
Vertical or horizontal.
Implementations§
source§impl BitmapSize
impl BitmapSize
sourcepub fn index_subtable_array_offset(&self) -> u32
pub fn index_subtable_array_offset(&self) -> u32
Offset to index subtable from beginning of EBLC/CBLC.
sourcepub fn index_tables_size(&self) -> u32
pub fn index_tables_size(&self) -> u32
Number of bytes in corresponding index subtables and array.
sourcepub fn number_of_index_subtables(&self) -> u32
pub fn number_of_index_subtables(&self) -> u32
There is an index subtable for each range or format change.
sourcepub fn hori(&self) -> &SbitLineMetrics
pub fn hori(&self) -> &SbitLineMetrics
Line metrics for text rendered horizontally.
sourcepub fn vert(&self) -> &SbitLineMetrics
pub fn vert(&self) -> &SbitLineMetrics
Line metrics for text rendered vertically.
sourcepub fn start_glyph_index(&self) -> GlyphId16
pub fn start_glyph_index(&self) -> GlyphId16
Lowest glyph index for this size.
sourcepub fn end_glyph_index(&self) -> GlyphId16
pub fn end_glyph_index(&self) -> GlyphId16
Highest glyph index for this size.
sourcepub fn bit_depth(&self) -> u8
pub fn bit_depth(&self) -> u8
The Microsoft rasterizer v.1.7 or greater supports the following bitDepth values, as described below: 1, 2, 4, and 8 (and 32 for CBLC).
sourcepub fn flags(&self) -> BitmapFlags
pub fn flags(&self) -> BitmapFlags
Vertical or horizontal.
source§impl BitmapSize
impl BitmapSize
sourcepub fn location(
&self,
offset_data: FontData<'_>,
glyph_id: GlyphId,
) -> Result<BitmapLocation, ReadError>
pub fn location( &self, offset_data: FontData<'_>, glyph_id: GlyphId, ) -> Result<BitmapLocation, ReadError>
Returns the bitmap location information for the given glyph.
The offset_data
parameter is provided by the offset_data()
method
of the parent Eblc
or Cblc
table.
The resulting BitmapLocation
value is used by the data()
method
in the associated Ebdt
or Cbdt
table to extract the bitmap data.
Trait Implementations§
source§impl Clone for BitmapSize
impl Clone for BitmapSize
source§fn clone(&self) -> BitmapSize
fn clone(&self) -> BitmapSize
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BitmapSize
impl Debug for BitmapSize
source§impl FixedSize for BitmapSize
impl FixedSize for BitmapSize
source§const RAW_BYTE_LEN: usize = 48usize
const RAW_BYTE_LEN: usize = 48usize
source§impl Hash for BitmapSize
impl Hash for BitmapSize
source§impl Ord for BitmapSize
impl Ord for BitmapSize
source§fn cmp(&self, other: &BitmapSize) -> Ordering
fn cmp(&self, other: &BitmapSize) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for BitmapSize
impl PartialEq for BitmapSize
source§impl PartialOrd for BitmapSize
impl PartialOrd for BitmapSize
source§impl<'a> SomeRecord<'a> for BitmapSize
impl<'a> SomeRecord<'a> for BitmapSize
fn traverse(self, data: FontData<'a>) -> RecordResolver<'a>
impl AnyBitPattern for BitmapSize
impl Copy for BitmapSize
impl Eq for BitmapSize
impl StructuralPartialEq for BitmapSize
Auto Trait Implementations§
impl Freeze for BitmapSize
impl RefUnwindSafe for BitmapSize
impl Send for BitmapSize
impl Sync for BitmapSize
impl Unpin for BitmapSize
impl UnwindSafe for BitmapSize
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
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
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)
clone_to_uninit
)