Transform outline if fake italic provided
This commit is contained in:
parent
6b3f6cb95e
commit
b7eb658166
1 changed files with 8 additions and 1 deletions
|
|
@ -84,9 +84,16 @@ fn swash_outline_commands(
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Scale the outline
|
// Scale the outline
|
||||||
let outline = scaler
|
let mut outline = scaler
|
||||||
.scale_outline(cache_key.glyph_id)
|
.scale_outline(cache_key.glyph_id)
|
||||||
.or_else(|| scaler.scale_color_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
|
// Get the path information of the outline
|
||||||
let path = outline.path();
|
let path = outline.path();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue