Skip to main content

write_fonts/tables/
vhea.rs

1//! the [vhea (Vertical Header)](https://learn.microsoft.com/en-us/typography/opentype/spec/vhea) table
2
3include!("../../generated/generated_vhea.rs");
4
5#[cfg(test)]
6mod tests {
7    use super::*;
8
9    #[test]
10    fn version_serialization() {
11        let table = Vhea::default();
12        let dumped = crate::dump_table(&table).unwrap();
13        let raw_version = u32::from_be_bytes(dumped[..4].try_into().unwrap());
14        // this is not a (u16, u16) pair, but a Version16Dot16, which has its own
15        // weird representation
16        assert_eq!(raw_version, 0x00011000);
17    }
18}