Skip to content

Commit

Permalink
Fix behaviour in component glyph (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenzV authored Jun 2, 2024
1 parent dabe8a5 commit 98ca251
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/tables/gvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1837,19 +1837,20 @@ fn outline_var_impl(
transform = Transform::combine(transform, component.transform);

let mut b = glyf::Builder::new(transform, builder.bbox, builder.builder);
let glyph_data = glyf_table.get(component.glyph_id)?;
outline_var_impl(
glyf_table,
gvar_table,
component.glyph_id,
glyph_data,
coordinates,
depth + 1,
&mut b,
)?;

// Take updated bbox.
builder.bbox = b.bbox;
if let Some(glyph_data) = glyf_table.get(component.glyph_id) {
outline_var_impl(
glyf_table,
gvar_table,
component.glyph_id,
glyph_data,
coordinates,
depth + 1,
&mut b,
)?;

// Take updated bbox.
builder.bbox = b.bbox;
}
}

Some(())
Expand Down

0 comments on commit 98ca251

Please sign in to comment.