diff --git a/Lib/fontbakery/checks/shared_conditions.py b/Lib/fontbakery/checks/shared_conditions.py index 1e1d2cc7c9..b29a9e83bf 100644 --- a/Lib/fontbakery/checks/shared_conditions.py +++ b/Lib/fontbakery/checks/shared_conditions.py @@ -225,17 +225,14 @@ def has_feature(font, featureTag): return False -def characters_per_script(ttFont, script, category=None): +def characters_per_script(ttFont, target_script, target_category=None): """Return the number of characters in a font for a given script""" - from youseedee import ucd_data + from unicodedataplus import script, category characters = [] for codepoint in ttFont.getBestCmap().keys(): - data = ucd_data(codepoint) - if ( - "Script" in data - and data["Script"] == script - and (not category or data["General_Category"] == category) + if script(chr(codepoint)) == target_script and ( + not target_category or category(chr(codepoint)) == target_category ): characters.append(codepoint) diff --git a/Lib/fontbakery/checks/universal/__init__.py b/Lib/fontbakery/checks/universal/__init__.py index 53d78ec6f7..c909a246b8 100644 --- a/Lib/fontbakery/checks/universal/__init__.py +++ b/Lib/fontbakery/checks/universal/__init__.py @@ -2739,7 +2739,6 @@ def com_google_fonts_check_alt_caron(ttFont): @check( id="com.google.fonts/check/case_mapping", - conditions=["network"], rationale=""" Ensure that no glyph lacks its corresponding upper or lower counterpart (but only when unicode supports case-mapping). @@ -2821,7 +2820,6 @@ def com_google_fonts_check_case_mapping(ttFont): @check( id="com.google.fonts/check/missing_small_caps_glyphs", - conditions=["network"], rationale=""" Ensure small caps glyphs are available if a font declares smcp or c2sc OT features. diff --git a/pyproject.toml b/pyproject.toml index 63db07ec4f..254b6dca3c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ dependencies = [ "uharfbuzz", "vharfbuzz >= 0.2.0", "typing_extensions ; python_version < '3.11'", - "youseedee", + "unicodedataplus", ] [project.optional-dependencies]