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.
source§fn table_type(&self) -> TableType
fn table_type(&self) -> TableType
The type of this table. Read more
source§impl From<Cmap0> for CmapSubtable
impl From<Cmap0> for CmapSubtable
source§fn from(src: Cmap0) -> CmapSubtable
fn from(src: Cmap0) -> CmapSubtable
Converts to this type from the input type.
source§impl From<Cmap10> for CmapSubtable
impl From<Cmap10> for CmapSubtable
source§fn from(src: Cmap10) -> CmapSubtable
fn from(src: Cmap10) -> CmapSubtable
Converts to this type from the input type.
source§impl From<Cmap12> for CmapSubtable
impl From<Cmap12> for CmapSubtable
source§fn from(src: Cmap12) -> CmapSubtable
fn from(src: Cmap12) -> CmapSubtable
Converts to this type from the input type.
source§impl From<Cmap13> for CmapSubtable
impl From<Cmap13> for CmapSubtable
source§fn from(src: Cmap13) -> CmapSubtable
fn from(src: Cmap13) -> CmapSubtable
Converts to this type from the input type.
source§impl From<Cmap14> for CmapSubtable
impl From<Cmap14> for CmapSubtable
source§fn from(src: Cmap14) -> CmapSubtable
fn from(src: Cmap14) -> CmapSubtable
Converts to this type from the input type.
source§impl From<Cmap2> for CmapSubtable
impl From<Cmap2> for CmapSubtable
source§fn from(src: Cmap2) -> CmapSubtable
fn from(src: Cmap2) -> CmapSubtable
Converts to this type from the input type.
source§impl From<Cmap4> for CmapSubtable
impl From<Cmap4> for CmapSubtable
source§fn from(src: Cmap4) -> CmapSubtable
fn from(src: Cmap4) -> CmapSubtable
Converts to this type from the input type.
source§impl From<Cmap6> for CmapSubtable
impl From<Cmap6> for CmapSubtable
source§fn from(src: Cmap6) -> CmapSubtable
fn from(src: Cmap6) -> CmapSubtable
Converts to this type from the input type.
source§impl From<Cmap8> for CmapSubtable
impl From<Cmap8> for CmapSubtable
source§fn from(src: Cmap8) -> CmapSubtable
fn from(src: Cmap8) -> CmapSubtable
Converts to this type from the input type.
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 Hash for CmapSubtable
impl Hash for CmapSubtable
source§impl Ord for CmapSubtable
impl Ord for CmapSubtable
source§fn cmp(&self, other: &CmapSubtable) -> Ordering
fn cmp(&self, other: &CmapSubtable) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for CmapSubtable
impl PartialEq for CmapSubtable
source§fn eq(&self, other: &CmapSubtable) -> bool
fn eq(&self, other: &CmapSubtable) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for CmapSubtable
impl PartialOrd for CmapSubtable
source§fn partial_cmp(&self, other: &CmapSubtable) -> Option<Ordering>
fn partial_cmp(&self, other: &CmapSubtable) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§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
impl Eq for CmapSubtable
impl StructuralPartialEq for CmapSubtable
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<'a, T> FontReadWithArgs<'a> for Twhere
T: FontRead<'a>,
impl<'a, T> FontReadWithArgs<'a> for Twhere
T: FontRead<'a>,
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.