We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
hhea
1 parent fe7a0a2 commit d8af4f7Copy full SHA for d8af4f7
1 file changed
src/hmtx.rs
@@ -60,7 +60,7 @@ pub fn subset(ctx: &mut Context) -> Result<()> {
60
61
let hhea = ctx.expect_table(Tag::HHEA).ok_or(MalformedFont)?;
62
let mut sub_hhea = Writer::new();
63
- sub_hhea.extend(&hhea[0..hhea.len() - 2]);
+ sub_hhea.extend(hhea.get(..hhea.len() - 2).ok_or(MalformedFont)?);
64
sub_hhea.write::<u16>(last_advance_width_index + 1);
65
66
ctx.push(Tag::HHEA, sub_hhea.finish());
0 commit comments