#[allow(unused_imports)]
use crate::codegen_prelude::*;
pub use read_fonts::tables::math::PartFlags;
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Math {
pub math_constants: OffsetMarker<MathConstants>,
pub math_glyph_info: OffsetMarker<MathGlyphInfo>,
pub math_variants: OffsetMarker<MathVariants>,
}
impl Math {
pub fn new(
math_constants: MathConstants,
math_glyph_info: MathGlyphInfo,
math_variants: MathVariants,
) -> Self {
Self {
math_constants: math_constants.into(),
math_glyph_info: math_glyph_info.into(),
math_variants: math_variants.into(),
}
}
}
impl FontWrite for Math {
#[allow(clippy::unnecessary_cast)]
fn write_into(&self, writer: &mut TableWriter) {
let version = MajorMinor::VERSION_1_0 as MajorMinor;
version.write_into(writer);
self.math_constants.write_into(writer);
self.math_glyph_info.write_into(writer);
self.math_variants.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::TopLevel(Math::TAG)
}
}
impl Validate for Math {
fn validate_impl(&self, ctx: &mut ValidationCtx) {
ctx.in_table("Math", |ctx| {
ctx.in_field("math_constants", |ctx| {
self.math_constants.validate_impl(ctx);
});
ctx.in_field("math_glyph_info", |ctx| {
self.math_glyph_info.validate_impl(ctx);
});
ctx.in_field("math_variants", |ctx| {
self.math_variants.validate_impl(ctx);
});
})
}
}
impl TopLevelTable for Math {
const TAG: Tag = Tag::new(b"MATH");
}
impl<'a> FromObjRef<read_fonts::tables::math::Math<'a>> for Math {
fn from_obj_ref(obj: &read_fonts::tables::math::Math<'a>, _: FontData) -> Self {
Math {
math_constants: obj.math_constants().to_owned_table(),
math_glyph_info: obj.math_glyph_info().to_owned_table(),
math_variants: obj.math_variants().to_owned_table(),
}
}
}
#[allow(clippy::needless_lifetimes)]
impl<'a> FromTableRef<read_fonts::tables::math::Math<'a>> for Math {}
impl ReadArgs for Math {
type Args = ();
}
impl<'a> FontRead<'a> for Math {
fn read_with_args(data: FontData<'a>, _: ()) -> Result<Self, ReadError> {
<read_fonts::tables::math::Math as FontRead>::read(data).map(|x| x.to_owned_table())
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathValueRecord {
pub value: FWord,
pub device: NullableOffsetMarker<DeviceOrVariationIndex>,
}
impl MathValueRecord {
pub fn new(value: FWord, device: Option<DeviceOrVariationIndex>) -> Self {
Self {
value,
device: device.into(),
}
}
}
impl FontWrite for MathValueRecord {
fn write_into(&self, writer: &mut TableWriter) {
self.value.write_into(writer);
self.device.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::Named("MathValueRecord")
}
}
impl Validate for MathValueRecord {
fn validate_impl(&self, ctx: &mut ValidationCtx) {
ctx.in_table("MathValueRecord", |ctx| {
ctx.in_field("device", |ctx| {
self.device.validate_impl(ctx);
});
})
}
}
impl FromObjRef<read_fonts::tables::math::MathValueRecord> for MathValueRecord {
fn from_obj_ref(
obj: &read_fonts::tables::math::MathValueRecord,
offset_data: FontData,
) -> Self {
MathValueRecord {
value: obj.value(),
device: obj.device(offset_data).to_owned_table(),
}
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathConstants {
pub script_percent_scale_down: i16,
pub script_script_percent_scale_down: i16,
pub delimited_sub_formula_min_height: UfWord,
pub display_operator_min_height: UfWord,
pub math_leading: MathValueRecord,
pub axis_height: MathValueRecord,
pub accent_base_height: MathValueRecord,
pub flattened_accent_base_height: MathValueRecord,
pub subscript_shift_down: MathValueRecord,
pub subscript_top_max: MathValueRecord,
pub subscript_baseline_drop_min: MathValueRecord,
pub superscript_shift_up: MathValueRecord,
pub superscript_shift_up_cramped: MathValueRecord,
pub superscript_bottom_min: MathValueRecord,
pub superscript_baseline_drop_max: MathValueRecord,
pub sub_superscript_gap_min: MathValueRecord,
pub superscript_bottom_max_with_subscript: MathValueRecord,
pub space_after_script: MathValueRecord,
pub upper_limit_gap_min: MathValueRecord,
pub upper_limit_baseline_rise_min: MathValueRecord,
pub lower_limit_gap_min: MathValueRecord,
pub lower_limit_baseline_drop_min: MathValueRecord,
pub stack_top_shift_up: MathValueRecord,
pub stack_top_display_style_shift_up: MathValueRecord,
pub stack_bottom_shift_down: MathValueRecord,
pub stack_bottom_display_style_shift_down: MathValueRecord,
pub stack_gap_min: MathValueRecord,
pub stack_display_style_gap_min: MathValueRecord,
pub stretch_stack_top_shift_up: MathValueRecord,
pub stretch_stack_bottom_shift_down: MathValueRecord,
pub stretch_stack_gap_above_min: MathValueRecord,
pub stretch_stack_gap_below_min: MathValueRecord,
pub fraction_numerator_shift_up: MathValueRecord,
pub fraction_numerator_display_style_shift_up: MathValueRecord,
pub fraction_denominator_shift_down: MathValueRecord,
pub fraction_denominator_display_style_shift_down: MathValueRecord,
pub fraction_numerator_gap_min: MathValueRecord,
pub fraction_num_display_style_gap_min: MathValueRecord,
pub fraction_rule_thickness: MathValueRecord,
pub fraction_denominator_gap_min: MathValueRecord,
pub fraction_denom_display_style_gap_min: MathValueRecord,
pub skewed_fraction_horizontal_gap: MathValueRecord,
pub skewed_fraction_vertical_gap: MathValueRecord,
pub overbar_vertical_gap: MathValueRecord,
pub overbar_rule_thickness: MathValueRecord,
pub overbar_extra_ascender: MathValueRecord,
pub underbar_vertical_gap: MathValueRecord,
pub underbar_rule_thickness: MathValueRecord,
pub underbar_extra_descender: MathValueRecord,
pub radical_vertical_gap: MathValueRecord,
pub radical_display_style_vertical_gap: MathValueRecord,
pub radical_rule_thickness: MathValueRecord,
pub radical_extra_ascender: MathValueRecord,
pub radical_kern_before_degree: MathValueRecord,
pub radical_kern_after_degree: MathValueRecord,
pub radical_degree_bottom_raise_percent: i16,
}
impl MathConstants {
#[allow(clippy::too_many_arguments)]
pub fn new(
script_percent_scale_down: i16,
script_script_percent_scale_down: i16,
delimited_sub_formula_min_height: UfWord,
display_operator_min_height: UfWord,
math_leading: MathValueRecord,
axis_height: MathValueRecord,
accent_base_height: MathValueRecord,
flattened_accent_base_height: MathValueRecord,
subscript_shift_down: MathValueRecord,
subscript_top_max: MathValueRecord,
subscript_baseline_drop_min: MathValueRecord,
superscript_shift_up: MathValueRecord,
superscript_shift_up_cramped: MathValueRecord,
superscript_bottom_min: MathValueRecord,
superscript_baseline_drop_max: MathValueRecord,
sub_superscript_gap_min: MathValueRecord,
superscript_bottom_max_with_subscript: MathValueRecord,
space_after_script: MathValueRecord,
upper_limit_gap_min: MathValueRecord,
upper_limit_baseline_rise_min: MathValueRecord,
lower_limit_gap_min: MathValueRecord,
lower_limit_baseline_drop_min: MathValueRecord,
stack_top_shift_up: MathValueRecord,
stack_top_display_style_shift_up: MathValueRecord,
stack_bottom_shift_down: MathValueRecord,
stack_bottom_display_style_shift_down: MathValueRecord,
stack_gap_min: MathValueRecord,
stack_display_style_gap_min: MathValueRecord,
stretch_stack_top_shift_up: MathValueRecord,
stretch_stack_bottom_shift_down: MathValueRecord,
stretch_stack_gap_above_min: MathValueRecord,
stretch_stack_gap_below_min: MathValueRecord,
fraction_numerator_shift_up: MathValueRecord,
fraction_numerator_display_style_shift_up: MathValueRecord,
fraction_denominator_shift_down: MathValueRecord,
fraction_denominator_display_style_shift_down: MathValueRecord,
fraction_numerator_gap_min: MathValueRecord,
fraction_num_display_style_gap_min: MathValueRecord,
fraction_rule_thickness: MathValueRecord,
fraction_denominator_gap_min: MathValueRecord,
fraction_denom_display_style_gap_min: MathValueRecord,
skewed_fraction_horizontal_gap: MathValueRecord,
skewed_fraction_vertical_gap: MathValueRecord,
overbar_vertical_gap: MathValueRecord,
overbar_rule_thickness: MathValueRecord,
overbar_extra_ascender: MathValueRecord,
underbar_vertical_gap: MathValueRecord,
underbar_rule_thickness: MathValueRecord,
underbar_extra_descender: MathValueRecord,
radical_vertical_gap: MathValueRecord,
radical_display_style_vertical_gap: MathValueRecord,
radical_rule_thickness: MathValueRecord,
radical_extra_ascender: MathValueRecord,
radical_kern_before_degree: MathValueRecord,
radical_kern_after_degree: MathValueRecord,
radical_degree_bottom_raise_percent: i16,
) -> Self {
Self {
script_percent_scale_down,
script_script_percent_scale_down,
delimited_sub_formula_min_height,
display_operator_min_height,
math_leading,
axis_height,
accent_base_height,
flattened_accent_base_height,
subscript_shift_down,
subscript_top_max,
subscript_baseline_drop_min,
superscript_shift_up,
superscript_shift_up_cramped,
superscript_bottom_min,
superscript_baseline_drop_max,
sub_superscript_gap_min,
superscript_bottom_max_with_subscript,
space_after_script,
upper_limit_gap_min,
upper_limit_baseline_rise_min,
lower_limit_gap_min,
lower_limit_baseline_drop_min,
stack_top_shift_up,
stack_top_display_style_shift_up,
stack_bottom_shift_down,
stack_bottom_display_style_shift_down,
stack_gap_min,
stack_display_style_gap_min,
stretch_stack_top_shift_up,
stretch_stack_bottom_shift_down,
stretch_stack_gap_above_min,
stretch_stack_gap_below_min,
fraction_numerator_shift_up,
fraction_numerator_display_style_shift_up,
fraction_denominator_shift_down,
fraction_denominator_display_style_shift_down,
fraction_numerator_gap_min,
fraction_num_display_style_gap_min,
fraction_rule_thickness,
fraction_denominator_gap_min,
fraction_denom_display_style_gap_min,
skewed_fraction_horizontal_gap,
skewed_fraction_vertical_gap,
overbar_vertical_gap,
overbar_rule_thickness,
overbar_extra_ascender,
underbar_vertical_gap,
underbar_rule_thickness,
underbar_extra_descender,
radical_vertical_gap,
radical_display_style_vertical_gap,
radical_rule_thickness,
radical_extra_ascender,
radical_kern_before_degree,
radical_kern_after_degree,
radical_degree_bottom_raise_percent,
}
}
}
impl FontWrite for MathConstants {
fn write_into(&self, writer: &mut TableWriter) {
self.script_percent_scale_down.write_into(writer);
self.script_script_percent_scale_down.write_into(writer);
self.delimited_sub_formula_min_height.write_into(writer);
self.display_operator_min_height.write_into(writer);
self.math_leading.write_into(writer);
self.axis_height.write_into(writer);
self.accent_base_height.write_into(writer);
self.flattened_accent_base_height.write_into(writer);
self.subscript_shift_down.write_into(writer);
self.subscript_top_max.write_into(writer);
self.subscript_baseline_drop_min.write_into(writer);
self.superscript_shift_up.write_into(writer);
self.superscript_shift_up_cramped.write_into(writer);
self.superscript_bottom_min.write_into(writer);
self.superscript_baseline_drop_max.write_into(writer);
self.sub_superscript_gap_min.write_into(writer);
self.superscript_bottom_max_with_subscript
.write_into(writer);
self.space_after_script.write_into(writer);
self.upper_limit_gap_min.write_into(writer);
self.upper_limit_baseline_rise_min.write_into(writer);
self.lower_limit_gap_min.write_into(writer);
self.lower_limit_baseline_drop_min.write_into(writer);
self.stack_top_shift_up.write_into(writer);
self.stack_top_display_style_shift_up.write_into(writer);
self.stack_bottom_shift_down.write_into(writer);
self.stack_bottom_display_style_shift_down
.write_into(writer);
self.stack_gap_min.write_into(writer);
self.stack_display_style_gap_min.write_into(writer);
self.stretch_stack_top_shift_up.write_into(writer);
self.stretch_stack_bottom_shift_down.write_into(writer);
self.stretch_stack_gap_above_min.write_into(writer);
self.stretch_stack_gap_below_min.write_into(writer);
self.fraction_numerator_shift_up.write_into(writer);
self.fraction_numerator_display_style_shift_up
.write_into(writer);
self.fraction_denominator_shift_down.write_into(writer);
self.fraction_denominator_display_style_shift_down
.write_into(writer);
self.fraction_numerator_gap_min.write_into(writer);
self.fraction_num_display_style_gap_min.write_into(writer);
self.fraction_rule_thickness.write_into(writer);
self.fraction_denominator_gap_min.write_into(writer);
self.fraction_denom_display_style_gap_min.write_into(writer);
self.skewed_fraction_horizontal_gap.write_into(writer);
self.skewed_fraction_vertical_gap.write_into(writer);
self.overbar_vertical_gap.write_into(writer);
self.overbar_rule_thickness.write_into(writer);
self.overbar_extra_ascender.write_into(writer);
self.underbar_vertical_gap.write_into(writer);
self.underbar_rule_thickness.write_into(writer);
self.underbar_extra_descender.write_into(writer);
self.radical_vertical_gap.write_into(writer);
self.radical_display_style_vertical_gap.write_into(writer);
self.radical_rule_thickness.write_into(writer);
self.radical_extra_ascender.write_into(writer);
self.radical_kern_before_degree.write_into(writer);
self.radical_kern_after_degree.write_into(writer);
self.radical_degree_bottom_raise_percent.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::Named("MathConstants")
}
}
impl Validate for MathConstants {
fn validate_impl(&self, _ctx: &mut ValidationCtx) {}
}
impl<'a> FromObjRef<read_fonts::tables::math::MathConstants<'a>> for MathConstants {
fn from_obj_ref(obj: &read_fonts::tables::math::MathConstants<'a>, _: FontData) -> Self {
let offset_data = obj.offset_data();
MathConstants {
script_percent_scale_down: obj.script_percent_scale_down(),
script_script_percent_scale_down: obj.script_script_percent_scale_down(),
delimited_sub_formula_min_height: obj.delimited_sub_formula_min_height(),
display_operator_min_height: obj.display_operator_min_height(),
math_leading: obj.math_leading().to_owned_obj(offset_data),
axis_height: obj.axis_height().to_owned_obj(offset_data),
accent_base_height: obj.accent_base_height().to_owned_obj(offset_data),
flattened_accent_base_height: obj
.flattened_accent_base_height()
.to_owned_obj(offset_data),
subscript_shift_down: obj.subscript_shift_down().to_owned_obj(offset_data),
subscript_top_max: obj.subscript_top_max().to_owned_obj(offset_data),
subscript_baseline_drop_min: obj
.subscript_baseline_drop_min()
.to_owned_obj(offset_data),
superscript_shift_up: obj.superscript_shift_up().to_owned_obj(offset_data),
superscript_shift_up_cramped: obj
.superscript_shift_up_cramped()
.to_owned_obj(offset_data),
superscript_bottom_min: obj.superscript_bottom_min().to_owned_obj(offset_data),
superscript_baseline_drop_max: obj
.superscript_baseline_drop_max()
.to_owned_obj(offset_data),
sub_superscript_gap_min: obj.sub_superscript_gap_min().to_owned_obj(offset_data),
superscript_bottom_max_with_subscript: obj
.superscript_bottom_max_with_subscript()
.to_owned_obj(offset_data),
space_after_script: obj.space_after_script().to_owned_obj(offset_data),
upper_limit_gap_min: obj.upper_limit_gap_min().to_owned_obj(offset_data),
upper_limit_baseline_rise_min: obj
.upper_limit_baseline_rise_min()
.to_owned_obj(offset_data),
lower_limit_gap_min: obj.lower_limit_gap_min().to_owned_obj(offset_data),
lower_limit_baseline_drop_min: obj
.lower_limit_baseline_drop_min()
.to_owned_obj(offset_data),
stack_top_shift_up: obj.stack_top_shift_up().to_owned_obj(offset_data),
stack_top_display_style_shift_up: obj
.stack_top_display_style_shift_up()
.to_owned_obj(offset_data),
stack_bottom_shift_down: obj.stack_bottom_shift_down().to_owned_obj(offset_data),
stack_bottom_display_style_shift_down: obj
.stack_bottom_display_style_shift_down()
.to_owned_obj(offset_data),
stack_gap_min: obj.stack_gap_min().to_owned_obj(offset_data),
stack_display_style_gap_min: obj
.stack_display_style_gap_min()
.to_owned_obj(offset_data),
stretch_stack_top_shift_up: obj.stretch_stack_top_shift_up().to_owned_obj(offset_data),
stretch_stack_bottom_shift_down: obj
.stretch_stack_bottom_shift_down()
.to_owned_obj(offset_data),
stretch_stack_gap_above_min: obj
.stretch_stack_gap_above_min()
.to_owned_obj(offset_data),
stretch_stack_gap_below_min: obj
.stretch_stack_gap_below_min()
.to_owned_obj(offset_data),
fraction_numerator_shift_up: obj
.fraction_numerator_shift_up()
.to_owned_obj(offset_data),
fraction_numerator_display_style_shift_up: obj
.fraction_numerator_display_style_shift_up()
.to_owned_obj(offset_data),
fraction_denominator_shift_down: obj
.fraction_denominator_shift_down()
.to_owned_obj(offset_data),
fraction_denominator_display_style_shift_down: obj
.fraction_denominator_display_style_shift_down()
.to_owned_obj(offset_data),
fraction_numerator_gap_min: obj.fraction_numerator_gap_min().to_owned_obj(offset_data),
fraction_num_display_style_gap_min: obj
.fraction_num_display_style_gap_min()
.to_owned_obj(offset_data),
fraction_rule_thickness: obj.fraction_rule_thickness().to_owned_obj(offset_data),
fraction_denominator_gap_min: obj
.fraction_denominator_gap_min()
.to_owned_obj(offset_data),
fraction_denom_display_style_gap_min: obj
.fraction_denom_display_style_gap_min()
.to_owned_obj(offset_data),
skewed_fraction_horizontal_gap: obj
.skewed_fraction_horizontal_gap()
.to_owned_obj(offset_data),
skewed_fraction_vertical_gap: obj
.skewed_fraction_vertical_gap()
.to_owned_obj(offset_data),
overbar_vertical_gap: obj.overbar_vertical_gap().to_owned_obj(offset_data),
overbar_rule_thickness: obj.overbar_rule_thickness().to_owned_obj(offset_data),
overbar_extra_ascender: obj.overbar_extra_ascender().to_owned_obj(offset_data),
underbar_vertical_gap: obj.underbar_vertical_gap().to_owned_obj(offset_data),
underbar_rule_thickness: obj.underbar_rule_thickness().to_owned_obj(offset_data),
underbar_extra_descender: obj.underbar_extra_descender().to_owned_obj(offset_data),
radical_vertical_gap: obj.radical_vertical_gap().to_owned_obj(offset_data),
radical_display_style_vertical_gap: obj
.radical_display_style_vertical_gap()
.to_owned_obj(offset_data),
radical_rule_thickness: obj.radical_rule_thickness().to_owned_obj(offset_data),
radical_extra_ascender: obj.radical_extra_ascender().to_owned_obj(offset_data),
radical_kern_before_degree: obj.radical_kern_before_degree().to_owned_obj(offset_data),
radical_kern_after_degree: obj.radical_kern_after_degree().to_owned_obj(offset_data),
radical_degree_bottom_raise_percent: obj.radical_degree_bottom_raise_percent(),
}
}
}
#[allow(clippy::needless_lifetimes)]
impl<'a> FromTableRef<read_fonts::tables::math::MathConstants<'a>> for MathConstants {}
impl ReadArgs for MathConstants {
type Args = ();
}
impl<'a> FontRead<'a> for MathConstants {
fn read_with_args(data: FontData<'a>, _: ()) -> Result<Self, ReadError> {
<read_fonts::tables::math::MathConstants as FontRead>::read(data)
.map(|x| x.to_owned_table())
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathGlyphInfo {
pub math_italics_correction_info: NullableOffsetMarker<MathItalicsCorrectionInfo>,
pub math_top_accent_attachment: NullableOffsetMarker<MathTopAccentAttachment>,
pub extended_shape_coverage: NullableOffsetMarker<CoverageTable>,
pub math_kern_info: NullableOffsetMarker<MathKernInfo>,
}
impl MathGlyphInfo {
pub fn new(
math_italics_correction_info: Option<MathItalicsCorrectionInfo>,
math_top_accent_attachment: Option<MathTopAccentAttachment>,
extended_shape_coverage: Option<CoverageTable>,
math_kern_info: Option<MathKernInfo>,
) -> Self {
Self {
math_italics_correction_info: math_italics_correction_info.into(),
math_top_accent_attachment: math_top_accent_attachment.into(),
extended_shape_coverage: extended_shape_coverage.into(),
math_kern_info: math_kern_info.into(),
}
}
}
impl FontWrite for MathGlyphInfo {
fn write_into(&self, writer: &mut TableWriter) {
self.math_italics_correction_info.write_into(writer);
self.math_top_accent_attachment.write_into(writer);
self.extended_shape_coverage.write_into(writer);
self.math_kern_info.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::Named("MathGlyphInfo")
}
}
impl Validate for MathGlyphInfo {
fn validate_impl(&self, ctx: &mut ValidationCtx) {
ctx.in_table("MathGlyphInfo", |ctx| {
ctx.in_field("math_italics_correction_info", |ctx| {
self.math_italics_correction_info.validate_impl(ctx);
});
ctx.in_field("math_top_accent_attachment", |ctx| {
self.math_top_accent_attachment.validate_impl(ctx);
});
ctx.in_field("extended_shape_coverage", |ctx| {
self.extended_shape_coverage.validate_impl(ctx);
});
ctx.in_field("math_kern_info", |ctx| {
self.math_kern_info.validate_impl(ctx);
});
})
}
}
impl<'a> FromObjRef<read_fonts::tables::math::MathGlyphInfo<'a>> for MathGlyphInfo {
fn from_obj_ref(obj: &read_fonts::tables::math::MathGlyphInfo<'a>, _: FontData) -> Self {
MathGlyphInfo {
math_italics_correction_info: obj.math_italics_correction_info().to_owned_table(),
math_top_accent_attachment: obj.math_top_accent_attachment().to_owned_table(),
extended_shape_coverage: obj.extended_shape_coverage().to_owned_table(),
math_kern_info: obj.math_kern_info().to_owned_table(),
}
}
}
#[allow(clippy::needless_lifetimes)]
impl<'a> FromTableRef<read_fonts::tables::math::MathGlyphInfo<'a>> for MathGlyphInfo {}
impl ReadArgs for MathGlyphInfo {
type Args = ();
}
impl<'a> FontRead<'a> for MathGlyphInfo {
fn read_with_args(data: FontData<'a>, _: ()) -> Result<Self, ReadError> {
<read_fonts::tables::math::MathGlyphInfo as FontRead>::read(data)
.map(|x| x.to_owned_table())
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathItalicsCorrectionInfo {
pub coverage: OffsetMarker<CoverageTable>,
pub italics_correction: Vec<MathValueRecord>,
}
impl MathItalicsCorrectionInfo {
pub fn new(coverage: CoverageTable, italics_correction: Vec<MathValueRecord>) -> Self {
Self {
coverage: coverage.into(),
italics_correction,
}
}
}
impl FontWrite for MathItalicsCorrectionInfo {
#[allow(clippy::unnecessary_cast)]
fn write_into(&self, writer: &mut TableWriter) {
self.coverage.write_into(writer);
(u16::try_from(array_len(&self.italics_correction)).unwrap()).write_into(writer);
self.italics_correction.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::Named("MathItalicsCorrectionInfo")
}
}
impl Validate for MathItalicsCorrectionInfo {
fn validate_impl(&self, ctx: &mut ValidationCtx) {
ctx.in_table("MathItalicsCorrectionInfo", |ctx| {
ctx.in_field("coverage", |ctx| {
self.coverage.validate_impl(ctx);
});
ctx.in_field("italics_correction", |ctx| {
if self.italics_correction.len() > to_usize(u16::MAX) {
ctx.report("array exceeds max length");
}
self.italics_correction.validate_impl(ctx);
});
})
}
}
impl<'a> FromObjRef<read_fonts::tables::math::MathItalicsCorrectionInfo<'a>>
for MathItalicsCorrectionInfo
{
fn from_obj_ref(
obj: &read_fonts::tables::math::MathItalicsCorrectionInfo<'a>,
_: FontData,
) -> Self {
let offset_data = obj.offset_data();
MathItalicsCorrectionInfo {
coverage: obj.coverage().to_owned_table(),
italics_correction: obj.italics_correction().to_owned_obj(offset_data),
}
}
}
#[allow(clippy::needless_lifetimes)]
impl<'a> FromTableRef<read_fonts::tables::math::MathItalicsCorrectionInfo<'a>>
for MathItalicsCorrectionInfo
{
}
impl ReadArgs for MathItalicsCorrectionInfo {
type Args = ();
}
impl<'a> FontRead<'a> for MathItalicsCorrectionInfo {
fn read_with_args(data: FontData<'a>, _: ()) -> Result<Self, ReadError> {
<read_fonts::tables::math::MathItalicsCorrectionInfo as FontRead>::read(data)
.map(|x| x.to_owned_table())
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathTopAccentAttachment {
pub top_accent_coverage: OffsetMarker<CoverageTable>,
pub top_accent_attachment: Vec<MathValueRecord>,
}
impl MathTopAccentAttachment {
pub fn new(
top_accent_coverage: CoverageTable,
top_accent_attachment: Vec<MathValueRecord>,
) -> Self {
Self {
top_accent_coverage: top_accent_coverage.into(),
top_accent_attachment,
}
}
}
impl FontWrite for MathTopAccentAttachment {
#[allow(clippy::unnecessary_cast)]
fn write_into(&self, writer: &mut TableWriter) {
self.top_accent_coverage.write_into(writer);
(u16::try_from(array_len(&self.top_accent_attachment)).unwrap()).write_into(writer);
self.top_accent_attachment.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::Named("MathTopAccentAttachment")
}
}
impl Validate for MathTopAccentAttachment {
fn validate_impl(&self, ctx: &mut ValidationCtx) {
ctx.in_table("MathTopAccentAttachment", |ctx| {
ctx.in_field("top_accent_coverage", |ctx| {
self.top_accent_coverage.validate_impl(ctx);
});
ctx.in_field("top_accent_attachment", |ctx| {
if self.top_accent_attachment.len() > to_usize(u16::MAX) {
ctx.report("array exceeds max length");
}
self.top_accent_attachment.validate_impl(ctx);
});
})
}
}
impl<'a> FromObjRef<read_fonts::tables::math::MathTopAccentAttachment<'a>>
for MathTopAccentAttachment
{
fn from_obj_ref(
obj: &read_fonts::tables::math::MathTopAccentAttachment<'a>,
_: FontData,
) -> Self {
let offset_data = obj.offset_data();
MathTopAccentAttachment {
top_accent_coverage: obj.top_accent_coverage().to_owned_table(),
top_accent_attachment: obj.top_accent_attachment().to_owned_obj(offset_data),
}
}
}
#[allow(clippy::needless_lifetimes)]
impl<'a> FromTableRef<read_fonts::tables::math::MathTopAccentAttachment<'a>>
for MathTopAccentAttachment
{
}
impl ReadArgs for MathTopAccentAttachment {
type Args = ();
}
impl<'a> FontRead<'a> for MathTopAccentAttachment {
fn read_with_args(data: FontData<'a>, _: ()) -> Result<Self, ReadError> {
<read_fonts::tables::math::MathTopAccentAttachment as FontRead>::read(data)
.map(|x| x.to_owned_table())
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathKernInfo {
pub math_kern_coverage: OffsetMarker<CoverageTable>,
pub math_kern_info_records: Vec<MathKernInfoRecord>,
}
impl MathKernInfo {
pub fn new(
math_kern_coverage: CoverageTable,
math_kern_info_records: Vec<MathKernInfoRecord>,
) -> Self {
Self {
math_kern_coverage: math_kern_coverage.into(),
math_kern_info_records,
}
}
}
impl FontWrite for MathKernInfo {
#[allow(clippy::unnecessary_cast)]
fn write_into(&self, writer: &mut TableWriter) {
self.math_kern_coverage.write_into(writer);
(u16::try_from(array_len(&self.math_kern_info_records)).unwrap()).write_into(writer);
self.math_kern_info_records.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::Named("MathKernInfo")
}
}
impl Validate for MathKernInfo {
fn validate_impl(&self, ctx: &mut ValidationCtx) {
ctx.in_table("MathKernInfo", |ctx| {
ctx.in_field("math_kern_coverage", |ctx| {
self.math_kern_coverage.validate_impl(ctx);
});
ctx.in_field("math_kern_info_records", |ctx| {
if self.math_kern_info_records.len() > to_usize(u16::MAX) {
ctx.report("array exceeds max length");
}
self.math_kern_info_records.validate_impl(ctx);
});
})
}
}
impl<'a> FromObjRef<read_fonts::tables::math::MathKernInfo<'a>> for MathKernInfo {
fn from_obj_ref(obj: &read_fonts::tables::math::MathKernInfo<'a>, _: FontData) -> Self {
let offset_data = obj.offset_data();
MathKernInfo {
math_kern_coverage: obj.math_kern_coverage().to_owned_table(),
math_kern_info_records: obj.math_kern_info_records().to_owned_obj(offset_data),
}
}
}
#[allow(clippy::needless_lifetimes)]
impl<'a> FromTableRef<read_fonts::tables::math::MathKernInfo<'a>> for MathKernInfo {}
impl ReadArgs for MathKernInfo {
type Args = ();
}
impl<'a> FontRead<'a> for MathKernInfo {
fn read_with_args(data: FontData<'a>, _: ()) -> Result<Self, ReadError> {
<read_fonts::tables::math::MathKernInfo as FontRead>::read(data).map(|x| x.to_owned_table())
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathKernInfoRecord {
pub top_right_math_kern: NullableOffsetMarker<MathKern>,
pub top_left_math_kern: NullableOffsetMarker<MathKern>,
pub bottom_right_math_kern: NullableOffsetMarker<MathKern>,
pub bottom_left_math_kern: NullableOffsetMarker<MathKern>,
}
impl MathKernInfoRecord {
pub fn new(
top_right_math_kern: Option<MathKern>,
top_left_math_kern: Option<MathKern>,
bottom_right_math_kern: Option<MathKern>,
bottom_left_math_kern: Option<MathKern>,
) -> Self {
Self {
top_right_math_kern: top_right_math_kern.into(),
top_left_math_kern: top_left_math_kern.into(),
bottom_right_math_kern: bottom_right_math_kern.into(),
bottom_left_math_kern: bottom_left_math_kern.into(),
}
}
}
impl FontWrite for MathKernInfoRecord {
fn write_into(&self, writer: &mut TableWriter) {
self.top_right_math_kern.write_into(writer);
self.top_left_math_kern.write_into(writer);
self.bottom_right_math_kern.write_into(writer);
self.bottom_left_math_kern.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::Named("MathKernInfoRecord")
}
}
impl Validate for MathKernInfoRecord {
fn validate_impl(&self, ctx: &mut ValidationCtx) {
ctx.in_table("MathKernInfoRecord", |ctx| {
ctx.in_field("top_right_math_kern", |ctx| {
self.top_right_math_kern.validate_impl(ctx);
});
ctx.in_field("top_left_math_kern", |ctx| {
self.top_left_math_kern.validate_impl(ctx);
});
ctx.in_field("bottom_right_math_kern", |ctx| {
self.bottom_right_math_kern.validate_impl(ctx);
});
ctx.in_field("bottom_left_math_kern", |ctx| {
self.bottom_left_math_kern.validate_impl(ctx);
});
})
}
}
impl FromObjRef<read_fonts::tables::math::MathKernInfoRecord> for MathKernInfoRecord {
fn from_obj_ref(
obj: &read_fonts::tables::math::MathKernInfoRecord,
offset_data: FontData,
) -> Self {
MathKernInfoRecord {
top_right_math_kern: obj.top_right_math_kern(offset_data).to_owned_table(),
top_left_math_kern: obj.top_left_math_kern(offset_data).to_owned_table(),
bottom_right_math_kern: obj.bottom_right_math_kern(offset_data).to_owned_table(),
bottom_left_math_kern: obj.bottom_left_math_kern(offset_data).to_owned_table(),
}
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathKern {
pub correction_height: Vec<MathValueRecord>,
pub kern_values: Vec<MathValueRecord>,
}
impl MathKern {
pub fn new(correction_height: Vec<MathValueRecord>, kern_values: Vec<MathValueRecord>) -> Self {
Self {
correction_height,
kern_values,
}
}
}
impl FontWrite for MathKern {
#[allow(clippy::unnecessary_cast)]
fn write_into(&self, writer: &mut TableWriter) {
(u16::try_from(array_len(&self.correction_height)).unwrap()).write_into(writer);
self.correction_height.write_into(writer);
self.kern_values.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::Named("MathKern")
}
}
impl Validate for MathKern {
fn validate_impl(&self, ctx: &mut ValidationCtx) {
ctx.in_table("MathKern", |ctx| {
ctx.in_field("correction_height", |ctx| {
if self.correction_height.len() > to_usize(u16::MAX) {
ctx.report("array exceeds max length");
}
self.correction_height.validate_impl(ctx);
});
ctx.in_field("kern_values", |ctx| {
self.kern_values.validate_impl(ctx);
});
})
}
}
impl<'a> FromObjRef<read_fonts::tables::math::MathKern<'a>> for MathKern {
fn from_obj_ref(obj: &read_fonts::tables::math::MathKern<'a>, _: FontData) -> Self {
let offset_data = obj.offset_data();
MathKern {
correction_height: obj.correction_height().to_owned_obj(offset_data),
kern_values: obj.kern_values().to_owned_obj(offset_data),
}
}
}
#[allow(clippy::needless_lifetimes)]
impl<'a> FromTableRef<read_fonts::tables::math::MathKern<'a>> for MathKern {}
impl ReadArgs for MathKern {
type Args = ();
}
impl<'a> FontRead<'a> for MathKern {
fn read_with_args(data: FontData<'a>, _: ()) -> Result<Self, ReadError> {
<read_fonts::tables::math::MathKern as FontRead>::read(data).map(|x| x.to_owned_table())
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathVariants {
pub min_connector_overlap: UfWord,
pub vert_glyph_coverage: NullableOffsetMarker<CoverageTable>,
pub horiz_glyph_coverage: NullableOffsetMarker<CoverageTable>,
pub vert_glyph_constructions: Vec<OffsetMarker<MathGlyphConstruction>>,
pub horiz_glyph_constructions: Vec<OffsetMarker<MathGlyphConstruction>>,
}
impl MathVariants {
pub fn new(
min_connector_overlap: UfWord,
vert_glyph_coverage: Option<CoverageTable>,
horiz_glyph_coverage: Option<CoverageTable>,
vert_glyph_constructions: Vec<MathGlyphConstruction>,
horiz_glyph_constructions: Vec<MathGlyphConstruction>,
) -> Self {
Self {
min_connector_overlap,
vert_glyph_coverage: vert_glyph_coverage.into(),
horiz_glyph_coverage: horiz_glyph_coverage.into(),
vert_glyph_constructions: vert_glyph_constructions
.into_iter()
.map(Into::into)
.collect(),
horiz_glyph_constructions: horiz_glyph_constructions
.into_iter()
.map(Into::into)
.collect(),
}
}
}
impl FontWrite for MathVariants {
#[allow(clippy::unnecessary_cast)]
fn write_into(&self, writer: &mut TableWriter) {
self.min_connector_overlap.write_into(writer);
self.vert_glyph_coverage.write_into(writer);
self.horiz_glyph_coverage.write_into(writer);
(u16::try_from(array_len(&self.vert_glyph_constructions)).unwrap()).write_into(writer);
(u16::try_from(array_len(&self.horiz_glyph_constructions)).unwrap()).write_into(writer);
self.vert_glyph_constructions.write_into(writer);
self.horiz_glyph_constructions.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::Named("MathVariants")
}
}
impl Validate for MathVariants {
fn validate_impl(&self, ctx: &mut ValidationCtx) {
ctx.in_table("MathVariants", |ctx| {
ctx.in_field("vert_glyph_coverage", |ctx| {
self.vert_glyph_coverage.validate_impl(ctx);
});
ctx.in_field("horiz_glyph_coverage", |ctx| {
self.horiz_glyph_coverage.validate_impl(ctx);
});
ctx.in_field("vert_glyph_constructions", |ctx| {
if self.vert_glyph_constructions.len() > to_usize(u16::MAX) {
ctx.report("array exceeds max length");
}
self.vert_glyph_constructions.validate_impl(ctx);
});
ctx.in_field("horiz_glyph_constructions", |ctx| {
if self.horiz_glyph_constructions.len() > to_usize(u16::MAX) {
ctx.report("array exceeds max length");
}
self.horiz_glyph_constructions.validate_impl(ctx);
});
})
}
}
impl<'a> FromObjRef<read_fonts::tables::math::MathVariants<'a>> for MathVariants {
fn from_obj_ref(obj: &read_fonts::tables::math::MathVariants<'a>, _: FontData) -> Self {
MathVariants {
min_connector_overlap: obj.min_connector_overlap(),
vert_glyph_coverage: obj.vert_glyph_coverage().to_owned_table(),
horiz_glyph_coverage: obj.horiz_glyph_coverage().to_owned_table(),
vert_glyph_constructions: obj.vert_glyph_constructions().to_owned_table(),
horiz_glyph_constructions: obj.horiz_glyph_constructions().to_owned_table(),
}
}
}
#[allow(clippy::needless_lifetimes)]
impl<'a> FromTableRef<read_fonts::tables::math::MathVariants<'a>> for MathVariants {}
impl ReadArgs for MathVariants {
type Args = ();
}
impl<'a> FontRead<'a> for MathVariants {
fn read_with_args(data: FontData<'a>, _: ()) -> Result<Self, ReadError> {
<read_fonts::tables::math::MathVariants as FontRead>::read(data).map(|x| x.to_owned_table())
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathGlyphConstruction {
pub glyph_assembly: NullableOffsetMarker<GlyphAssembly>,
pub math_glyph_variant_records: Vec<MathGlyphVariantRecord>,
}
impl MathGlyphConstruction {
pub fn new(
glyph_assembly: Option<GlyphAssembly>,
math_glyph_variant_records: Vec<MathGlyphVariantRecord>,
) -> Self {
Self {
glyph_assembly: glyph_assembly.into(),
math_glyph_variant_records,
}
}
}
impl FontWrite for MathGlyphConstruction {
#[allow(clippy::unnecessary_cast)]
fn write_into(&self, writer: &mut TableWriter) {
self.glyph_assembly.write_into(writer);
(u16::try_from(array_len(&self.math_glyph_variant_records)).unwrap()).write_into(writer);
self.math_glyph_variant_records.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::Named("MathGlyphConstruction")
}
}
impl Validate for MathGlyphConstruction {
fn validate_impl(&self, ctx: &mut ValidationCtx) {
ctx.in_table("MathGlyphConstruction", |ctx| {
ctx.in_field("glyph_assembly", |ctx| {
self.glyph_assembly.validate_impl(ctx);
});
ctx.in_field("math_glyph_variant_records", |ctx| {
if self.math_glyph_variant_records.len() > to_usize(u16::MAX) {
ctx.report("array exceeds max length");
}
self.math_glyph_variant_records.validate_impl(ctx);
});
})
}
}
impl<'a> FromObjRef<read_fonts::tables::math::MathGlyphConstruction<'a>> for MathGlyphConstruction {
fn from_obj_ref(
obj: &read_fonts::tables::math::MathGlyphConstruction<'a>,
_: FontData,
) -> Self {
let offset_data = obj.offset_data();
MathGlyphConstruction {
glyph_assembly: obj.glyph_assembly().to_owned_table(),
math_glyph_variant_records: obj.math_glyph_variant_records().to_owned_obj(offset_data),
}
}
}
#[allow(clippy::needless_lifetimes)]
impl<'a> FromTableRef<read_fonts::tables::math::MathGlyphConstruction<'a>>
for MathGlyphConstruction
{
}
impl ReadArgs for MathGlyphConstruction {
type Args = ();
}
impl<'a> FontRead<'a> for MathGlyphConstruction {
fn read_with_args(data: FontData<'a>, _: ()) -> Result<Self, ReadError> {
<read_fonts::tables::math::MathGlyphConstruction as FontRead>::read(data)
.map(|x| x.to_owned_table())
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct MathGlyphVariantRecord {
pub variant_glyph: GlyphId16,
pub advance_measurement: UfWord,
}
impl MathGlyphVariantRecord {
pub fn new(variant_glyph: GlyphId16, advance_measurement: UfWord) -> Self {
Self {
variant_glyph,
advance_measurement,
}
}
}
impl FontWrite for MathGlyphVariantRecord {
fn write_into(&self, writer: &mut TableWriter) {
self.variant_glyph.write_into(writer);
self.advance_measurement.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::Named("MathGlyphVariantRecord")
}
}
impl Validate for MathGlyphVariantRecord {
fn validate_impl(&self, _ctx: &mut ValidationCtx) {}
}
impl FromObjRef<read_fonts::tables::math::MathGlyphVariantRecord> for MathGlyphVariantRecord {
fn from_obj_ref(obj: &read_fonts::tables::math::MathGlyphVariantRecord, _: FontData) -> Self {
MathGlyphVariantRecord {
variant_glyph: obj.variant_glyph(),
advance_measurement: obj.advance_measurement(),
}
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct GlyphAssembly {
pub italics_correction: MathValueRecord,
pub part_records: Vec<GlyphPartRecord>,
}
impl GlyphAssembly {
pub fn new(italics_correction: MathValueRecord, part_records: Vec<GlyphPartRecord>) -> Self {
Self {
italics_correction,
part_records,
}
}
}
impl FontWrite for GlyphAssembly {
#[allow(clippy::unnecessary_cast)]
fn write_into(&self, writer: &mut TableWriter) {
self.italics_correction.write_into(writer);
(u16::try_from(array_len(&self.part_records)).unwrap()).write_into(writer);
self.part_records.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::Named("GlyphAssembly")
}
}
impl Validate for GlyphAssembly {
fn validate_impl(&self, ctx: &mut ValidationCtx) {
ctx.in_table("GlyphAssembly", |ctx| {
ctx.in_field("part_records", |ctx| {
if self.part_records.len() > to_usize(u16::MAX) {
ctx.report("array exceeds max length");
}
self.part_records.validate_impl(ctx);
});
})
}
}
impl<'a> FromObjRef<read_fonts::tables::math::GlyphAssembly<'a>> for GlyphAssembly {
fn from_obj_ref(obj: &read_fonts::tables::math::GlyphAssembly<'a>, _: FontData) -> Self {
let offset_data = obj.offset_data();
GlyphAssembly {
italics_correction: obj.italics_correction().to_owned_obj(offset_data),
part_records: obj.part_records().to_owned_obj(offset_data),
}
}
}
#[allow(clippy::needless_lifetimes)]
impl<'a> FromTableRef<read_fonts::tables::math::GlyphAssembly<'a>> for GlyphAssembly {}
impl ReadArgs for GlyphAssembly {
type Args = ();
}
impl<'a> FontRead<'a> for GlyphAssembly {
fn read_with_args(data: FontData<'a>, _: ()) -> Result<Self, ReadError> {
<read_fonts::tables::math::GlyphAssembly as FontRead>::read(data)
.map(|x| x.to_owned_table())
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct GlyphPartRecord {
pub glyph_id: GlyphId16,
pub start_connector_length: UfWord,
pub end_connector_length: UfWord,
pub full_advance: UfWord,
pub part_flags: PartFlags,
}
impl GlyphPartRecord {
pub fn new(
glyph_id: GlyphId16,
start_connector_length: UfWord,
end_connector_length: UfWord,
full_advance: UfWord,
part_flags: PartFlags,
) -> Self {
Self {
glyph_id,
start_connector_length,
end_connector_length,
full_advance,
part_flags,
}
}
}
impl FontWrite for GlyphPartRecord {
fn write_into(&self, writer: &mut TableWriter) {
self.glyph_id.write_into(writer);
self.start_connector_length.write_into(writer);
self.end_connector_length.write_into(writer);
self.full_advance.write_into(writer);
self.part_flags.write_into(writer);
}
fn table_type(&self) -> TableType {
TableType::Named("GlyphPartRecord")
}
}
impl Validate for GlyphPartRecord {
fn validate_impl(&self, _ctx: &mut ValidationCtx) {}
}
impl FromObjRef<read_fonts::tables::math::GlyphPartRecord> for GlyphPartRecord {
fn from_obj_ref(obj: &read_fonts::tables::math::GlyphPartRecord, _: FontData) -> Self {
GlyphPartRecord {
glyph_id: obj.glyph_id(),
start_connector_length: obj.start_connector_length(),
end_connector_length: obj.end_connector_length(),
full_advance: obj.full_advance(),
part_flags: obj.part_flags(),
}
}
}
impl FontWrite for PartFlags {
fn write_into(&self, writer: &mut TableWriter) {
writer.write_slice(&self.bits().to_be_bytes())
}
}