Enum write_fonts::tables::cmap::CmapSubtable
source · pub enum CmapSubtable {
Format0(Cmap0),
Format2(Cmap2),
Format4(Cmap4),
Format6(Cmap6),
Format8(Cmap8),
Format10(Cmap10),
Format12(Cmap12),
Format13(Cmap13),
Format14(Cmap14),
}Expand description
The different cmap subtable formats.
Variants§
Format0(Cmap0)
Format2(Cmap2)
Format4(Cmap4)
Format6(Cmap6)
Format8(Cmap8)
Format10(Cmap10)
Format12(Cmap12)
Format13(Cmap13)
Format14(Cmap14)
Implementations§
source§impl CmapSubtable
impl CmapSubtable
sourcepub fn format_2(length: u16, language: u16, sub_header_keys: Vec<u16>) -> Self
pub fn format_2(length: u16, language: u16, sub_header_keys: Vec<u16>) -> Self
Construct a new Cmap2 subtable
sourcepub fn format_4(
length: u16,
language: u16,
seg_count_x2: u16,
search_range: u16,
entry_selector: u16,
range_shift: u16,
end_code: Vec<u16>,
start_code: Vec<u16>,
id_delta: Vec<i16>,
id_range_offsets: Vec<u16>,
glyph_id_array: Vec<u16>
) -> Self
pub fn format_4( length: u16, language: u16, seg_count_x2: u16, search_range: u16, entry_selector: u16, range_shift: u16, end_code: Vec<u16>, start_code: Vec<u16>, id_delta: Vec<i16>, id_range_offsets: Vec<u16>, glyph_id_array: Vec<u16> ) -> Self
Construct a new Cmap4 subtable
sourcepub fn format_6(
length: u16,
language: u16,
first_code: u16,
entry_count: u16,
glyph_id_array: Vec<u16>
) -> Self
pub fn format_6( length: u16, language: u16, first_code: u16, entry_count: u16, glyph_id_array: Vec<u16> ) -> Self
Construct a new Cmap6 subtable
sourcepub fn format_8(
length: u32,
language: u32,
is32: Vec<u8>,
num_groups: u32,
groups: Vec<SequentialMapGroup>
) -> Self
pub fn format_8( length: u32, language: u32, is32: Vec<u8>, num_groups: u32, groups: Vec<SequentialMapGroup> ) -> Self
Construct a new Cmap8 subtable
sourcepub fn format_10(
length: u32,
language: u32,
start_char_code: u32,
num_chars: u32,
glyph_id_array: Vec<u16>
) -> Self
pub fn format_10( length: u32, language: u32, start_char_code: u32, num_chars: u32, glyph_id_array: Vec<u16> ) -> Self
Construct a new Cmap10 subtable
sourcepub fn format_12(
length: u32,
language: u32,
num_groups: u32,
groups: Vec<SequentialMapGroup>
) -> Self
pub fn format_12( length: u32, language: u32, num_groups: u32, groups: Vec<SequentialMapGroup> ) -> Self
Construct a new Cmap12 subtable
Trait Implementations§
source§impl Clone for CmapSubtable
impl Clone for CmapSubtable
source§fn clone(&self) -> CmapSubtable
fn clone(&self) -> CmapSubtable
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for CmapSubtable
impl Debug for CmapSubtable
source§impl Default for CmapSubtable
impl Default for CmapSubtable
source§impl<'a> FontRead<'a> for CmapSubtable
impl<'a> FontRead<'a> for CmapSubtable
source§impl FontWrite for CmapSubtable
impl FontWrite for CmapSubtable
source§fn write_into(&self, writer: &mut TableWriter)
fn write_into(&self, writer: &mut TableWriter)
Write our data and information about offsets into this TableWriter.
fn name(&self) -> &'static str
source§impl FromObjRef<CmapSubtable<'_>> for CmapSubtable
impl FromObjRef<CmapSubtable<'_>> for CmapSubtable
source§fn from_obj_ref(obj: &CmapSubtable<'_>, _: FontData<'_>) -> Self
fn from_obj_ref(obj: &CmapSubtable<'_>, _: FontData<'_>) -> Self
Convert
from to an instance of Self, using the provided data to resolve offsets.source§impl FromTableRef<CmapSubtable<'_>> for CmapSubtable
impl FromTableRef<CmapSubtable<'_>> for CmapSubtable
fn from_table_ref(from: &T) -> Self
source§impl Validate for CmapSubtable
impl Validate for CmapSubtable
source§fn validate_impl(&self, ctx: &mut ValidationCtx)
fn validate_impl(&self, ctx: &mut ValidationCtx)
Validate this table. Read more
Auto Trait Implementations§
impl RefUnwindSafe for CmapSubtable
impl Send for CmapSubtable
impl Sync for CmapSubtable
impl Unpin for CmapSubtable
impl UnwindSafe for CmapSubtable
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
source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere U: FromObjRef<T>,
source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.