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,13 +546,10 @@ 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)
{
CacheKeyFlags::FAKE_ITALIC
} else { } else {
CacheKeyFlags::empty() cache_key_flags
} }
} }