-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
The following code makes regular fonts to sometimes be considered as italic.
Lines 1451 to 1456 in 7b58ee3
| /// Checks that face is marked as *Italic*. | |
| #[inline] | |
| pub fn is_italic(&self) -> bool { | |
| // A face can have a Normal style and a non-zero italic angle, which also makes it italic. | |
| self.style() == Style::Italic || self.italic_angle() != 0.0 | |
| } |
I'm not sure if that's correct, as I've stumbled upon a font that's regular, but has italic angle set. It's considered as a regular font on my system (and it looks regular, no slant), so it looks like relying on italic angle is not the right approach here.
There's also the question whether oblique fonts are also classified as italic, as in some (usually application-level) contexts they are.
So I guess it depends on what's the definition of "is_italic". The doc doesn't help much in this regard, so I think there's a room for improvement here.
Metadata
Metadata
Assignees
Labels
No labels