name-parser: Prevent wrong modifier detection

[why]
Modifier on their own are not allowed (except "Demi").
The previous commit where we changed the CodeClimate fix from
' ' to '' allowed any modifier to be a stand alone detected word.

This resulted in this font name:
  RecMonoCasual Nerd Font Propo Semi

[how]
Remove the cumbesome CodeClimate kludge completely, it just makes the
code more complex without any real benefit. Codeclimate just complains
because our tables look so "similar" :rolleyes: That's data dude!

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2024-04-03 10:40:10 +02:00 committed by Fini
parent 9bf159f414
commit e1f7f4b59c

View file

@ -252,7 +252,6 @@ class FontnameTools:
'Thin': ('Th', 'Thin'),
'Thick': ('Tk', 'Thck'),
'Light': ('Lt', 'Light'),
'': (), # Just for CodeClimate :-/
}
known_styles = [ # Keywords that end up as style (i.e. a RIBBI set)
'Bold', 'Italic', 'Regular', 'Normal'