Refactor override_fake_italic()

This commit is contained in:
Todd York 2026-01-01 14:59:14 +08:00 committed by Jeremy Soller
parent a288f1d775
commit 2729d2d49c

View file

@ -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