Refactor override_fake_italic()
This commit is contained in:
parent
a288f1d775
commit
2729d2d49c
1 changed files with 5 additions and 8 deletions
13
src/shape.rs
13
src/shape.rs
|
|
@ -546,14 +546,11 @@ fn override_fake_italic(
|
||||||
font: &Font,
|
font: &Font,
|
||||||
attrs: &Attrs,
|
attrs: &Attrs,
|
||||||
) -> CacheKeyFlags {
|
) -> CacheKeyFlags {
|
||||||
cache_key_flags
|
if !font.italic_or_oblique && (attrs.style == Style::Italic || attrs.style == Style::Oblique) {
|
||||||
| if !font.italic_or_oblique
|
cache_key_flags | CacheKeyFlags::FAKE_ITALIC
|
||||||
&& (attrs.style == Style::Italic || attrs.style == Style::Oblique)
|
} else {
|
||||||
{
|
cache_key_flags
|
||||||
CacheKeyFlags::FAKE_ITALIC
|
}
|
||||||
} else {
|
|
||||||
CacheKeyFlags::empty()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A shaped glyph
|
/// A shaped glyph
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue