#[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
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
.