From 7d3c59b072eab19935979d239a6e0a4417452b06 Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Wed, 3 Apr 2024 14:29:26 +0200 Subject: [PATCH] name-parser: Remove superfluous Regular from ID17 We do not need "Condensed Regular" as ID17, a simple "Condensed" is enough. Signed-off-by: Fini Jastrow --- bin/scripts/name_parser/FontnameParser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/scripts/name_parser/FontnameParser.py b/bin/scripts/name_parser/FontnameParser.py index dc279fd7f..aaac5a67b 100644 --- a/bin/scripts/name_parser/FontnameParser.py +++ b/bin/scripts/name_parser/FontnameParser.py @@ -206,6 +206,8 @@ class FontnameParser: """Get the SFNT Preferred Styles (ID 17)""" styles = self.style_token weights = self.weight_token + if 'Regular' in styles and len(styles) + len(weights) > 1: + styles.remove('Regular') # For naming purposes we want Oblique to be part of the styles (weights, styles) = FontnameTools.make_oblique_style(weights, styles) pfs = FontnameTools.concat(weights, styles)