read_fonts/tables/
vmtx.rs1use super::hmtx;
4pub use super::hmtx::LongMetric;
5
6include!("../../generated/generated_vmtx.rs");
7
8macro_rules! impl_vmtx_lookup {
9 ($table:ident) => {
10 impl $table<'_> {
11 pub fn advance(&self, glyph_id: GlyphId) -> Option<u16> {
13 hmtx::advance(self.v_metrics(), glyph_id)
14 }
15
16 pub fn side_bearing(&self, glyph_id: GlyphId) -> Option<i16> {
18 hmtx::side_bearing(self.v_metrics(), self.top_side_bearings(), glyph_id)
19 }
20 }
21 };
22}
23
24impl_vmtx_lookup!(Vmtx);
25impl_vmtx_lookup!(VmtxExtended);