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,
|
||||
attrs: &Attrs,
|
||||
) -> CacheKeyFlags {
|
||||
cache_key_flags
|
||||
| if !font.italic_or_oblique
|
||||
&& (attrs.style == Style::Italic || attrs.style == Style::Oblique)
|
||||
{
|
||||
CacheKeyFlags::FAKE_ITALIC
|
||||
} else {
|
||||
CacheKeyFlags::empty()
|
||||
}
|
||||
if !font.italic_or_oblique && (attrs.style == Style::Italic || attrs.style == Style::Oblique) {
|
||||
cache_key_flags | CacheKeyFlags::FAKE_ITALIC
|
||||
} else {
|
||||
cache_key_flags
|
||||
}
|
||||
}
|
||||
|
||||
/// A shaped glyph
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue