pub type Cpal<'a> = TableRef<'a, CpalMarker>;
Expand description
Aliased Type§
struct Cpal<'a> { /* private fields */ }
Implementations§
source§impl<'a> Cpal<'a>
impl<'a> Cpal<'a>
sourcepub fn num_palette_entries(&self) -> u16
pub fn num_palette_entries(&self) -> u16
Number of palette entries in each palette.
sourcepub fn num_palettes(&self) -> u16
pub fn num_palettes(&self) -> u16
Number of palettes in the table.
sourcepub fn num_color_records(&self) -> u16
pub fn num_color_records(&self) -> u16
Total number of color records, combined for all palettes.
sourcepub fn color_records_array_offset(&self) -> Nullable<Offset32>
pub fn color_records_array_offset(&self) -> Nullable<Offset32>
Offset from the beginning of CPAL table to the first ColorRecord.
sourcepub fn color_records_array(
&self,
) -> Option<Result<&'a [ColorRecord], ReadError>>
pub fn color_records_array( &self, ) -> Option<Result<&'a [ColorRecord], ReadError>>
Attempt to resolve color_records_array_offset
.
sourcepub fn color_record_indices(&self) -> &'a [BigEndian<u16>]
pub fn color_record_indices(&self) -> &'a [BigEndian<u16>]
Index of each palette’s first color record in the combined color record array.
sourcepub fn palette_types_array_offset(&self) -> Option<Nullable<Offset32>>
pub fn palette_types_array_offset(&self) -> Option<Nullable<Offset32>>
Offset from the beginning of CPAL table to the Palette Types Array.
This is an array of 32-bit flag fields that describe properties of each palette.
sourcepub fn palette_types_array(
&self,
) -> Option<Result<&'a [BigEndian<PaletteType>], ReadError>>
pub fn palette_types_array( &self, ) -> Option<Result<&'a [BigEndian<PaletteType>], ReadError>>
Attempt to resolve palette_types_array_offset
.
sourcepub fn palette_labels_array_offset(&self) -> Option<Nullable<Offset32>>
pub fn palette_labels_array_offset(&self) -> Option<Nullable<Offset32>>
Offset from the beginning of CPAL table to the Palette Labels Array.
This is an array of ‘name’ table IDs (typically in the font-specific name ID range) that specify user interface strings associated with each palette. Use 0xFFFF if no name ID is provided for a palette.
sourcepub fn palette_labels_array(
&self,
) -> Option<Result<&'a [BigEndian<u16>], ReadError>>
pub fn palette_labels_array( &self, ) -> Option<Result<&'a [BigEndian<u16>], ReadError>>
Attempt to resolve palette_labels_array_offset
.
sourcepub fn palette_entry_labels_array_offset(&self) -> Option<Nullable<Offset32>>
pub fn palette_entry_labels_array_offset(&self) -> Option<Nullable<Offset32>>
Offset from the beginning of CPAL table to the Palette Entry Labels Array.
This is an array of ‘name’ table IDs (typically in the font-specific name ID range) that specify user interface strings associated with each palette entry, e.g. “Outline”, “Fill”. This set of palette entry labels applies to all palettes in the font. Use 0xFFFF if no name ID is provided for a palette entry.
sourcepub fn palette_entry_labels_array(
&self,
) -> Option<Result<&'a [BigEndian<NameId>], ReadError>>
pub fn palette_entry_labels_array( &self, ) -> Option<Result<&'a [BigEndian<NameId>], ReadError>>
Attempt to resolve palette_entry_labels_array_offset
.