Transform outline if fake italic provided

This commit is contained in:
Jeremy Soller 2025-07-02 10:57:33 -06:00
parent 6b3f6cb95e
commit b7eb658166
No known key found for this signature in database
GPG key ID: 670FDFB5428E05CA

View file

@ -84,9 +84,16 @@ fn swash_outline_commands(
.build();
// Scale the outline
let outline = scaler
let mut outline = scaler
.scale_outline(cache_key.glyph_id)
.or_else(|| scaler.scale_color_outline(cache_key.glyph_id))?;
if cache_key.flags.contains(CacheKeyFlags::FAKE_ITALIC) {
outline.transform(&Transform::skew(
Angle::from_degrees(14.0),
Angle::from_degrees(0.0),
));
}
// Get the path information of the outline
let path = outline.path();