1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-19 20:12:52 +02:00

name-parser: Fix REGULAR bit of fsSelection

Set bit 6 (REGULAR) of fsSelection only when bit 0 (ITALIC), bit 5 (BOLD), and bit 9 (OBLIQUE) are clear.
This commit is contained in:
negset 2023-05-10 16:50:50 +09:00
parent 3445d2d8fe
commit 9f6f89ae41

View File

@ -255,7 +255,7 @@ class FontnameParser:
elif 'Italic' in self.style_token:
b |= ITALIC
# Regular is just the basic weight
if len(self.weight_token) == 0:
if len(self.weight_token) == 0 and not b & (ITALIC | BOLD | OBLIQUE):
b |= REGULAR
b |= WWS # We assert this by our naming process
return b