diff --git a/CHANGELOG.md b/CHANGELOG.md index dcd467a..da304be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `com.google.fonts/check/family_naming_recommendations`: Two validations of PostScript name were moved out of this check and into separate new checks `com.adobe.fonts/check/postscript_name_characters` and `com.adobe.fonts/postscript_name_hyphens` which yield FAIL (https://github.com/miguelsousa/openbakery/pull/62). - `com.google.fonts/check/cjk_not_enough_glyphs`: This check is now only run when a font has CJK codepages or ranges declared in the `OS/2` table. Other CJK-related checks are run on fonts with a minimum of 150 CJK glyphs (https://github.com/fonttools/fontbakery/issues/3846). - `com.google.fonts/check/family/panose_familytype` and `com.google.fonts/check/family/panose_proportion`: Failures have been downgraded to warnings (https://github.com/fonttools/fontbakery/issues/4192). +- `com.adobe.fonts/check/postscript_name_characters`: Added underscore (`_` U+005F) to the set of characters allowed in PostScript name strings (https://github.com/miguelsousa/openbakery/pull/90). ### Fixed diff --git a/Lib/openbakery/profiles/name.py b/Lib/openbakery/profiles/name.py index 71b5016..7740643 100644 --- a/Lib/openbakery/profiles/name.py +++ b/Lib/openbakery/profiles/name.py @@ -423,14 +423,14 @@ def com_google_fonts_check_name_match_familyname_fullfont(ttFont): proposal="https://github.com/miguelsousa/openbakery/issues/62", ) def com_adobe_fonts_check_postscript_name_characters(ttFont): - """PostScript name contains only allowed characters a-ZA-Z and hyphen?""" + """PostScript name contains only allowed characters?""" import re from openbakery.utils import get_name_entry_strings bad_entry_count = 0 - # may contain only a-zA-Z0-9 - bad_psname = re.compile("[^A-Za-z0-9-]") + # may contain only the characters a-z A-Z 0-9 - and _ + bad_psname = re.compile("[^A-Za-z0-9-_]") for string in get_name_entry_strings(ttFont, NameID.POSTSCRIPT_NAME): if bad_psname.search(string): bad_entry_count += 1