read_fonts/tables/
maxp.rs1include!("../../generated/generated_maxp.rs");
4
5#[derive(Clone)]
7pub enum SelectedMaxp<'a> {
8 Original(Maxp<'a>),
10 Extended(MaxpExtended<'a>),
12}
13
14impl SelectedMaxp<'_> {
15 pub fn num_glyphs(&self) -> u32 {
17 match self {
18 Self::Original(table) => table.num_glyphs().into(),
19 Self::Extended(table) => table.num_glyphs().into(),
20 }
21 }
22
23 selected_table_getters!(
24 version -> Version16Dot16,
25 max_points -> Option<u16>,
26 max_contours -> Option<u16>,
27 max_composite_points -> Option<u16>,
28 max_composite_contours -> Option<u16>,
29 max_zones -> Option<u16>,
30 max_twilight_points -> Option<u16>,
31 max_storage -> Option<u16>,
32 max_function_defs -> Option<u16>,
33 max_instruction_defs -> Option<u16>,
34 max_stack_elements -> Option<u16>,
35 max_size_of_instructions -> Option<u16>,
36 max_component_elements -> Option<u16>,
37 max_component_depth -> Option<u16>,
38 );
39}