fonttools / fontbakery

🧁 A font quality assurance tool for everyone
https://fontbakery.readthedocs.io
Apache License 2.0
534 stars 99 forks source link

[web] Crash when using Type Network profile #4777

Open guidoferreyra opened 3 days ago

guidoferreyra commented 3 days ago

Observed behaviour

Web version is requesting 'shaping' extra while CLI version works correctly. This happen only when checking a variable font with TN’s profile.

Error message

Traceback (most recent call last):
  File "/lib/python3.11/site-packages/fontbakery/checks/shaping.py", line 449, in is_complex_shaper_font
    from ufo2ft.constants import INDIC_SCRIPTS, USE_SCRIPTS
  File "/lib/python3.11/site-packages/ufo2ft/__init__.py", line 1, in 
    from ufo2ft._compilers.interpolatableOTFCompiler import InterpolatableOTFCompiler
  File "/lib/python3.11/site-packages/ufo2ft/_compilers/interpolatableOTFCompiler.py", line 7, in 
    from ufo2ft.outlineCompiler import OutlineOTFCompiler
  File "/lib/python3.11/site-packages/ufo2ft/outlineCompiler.py", line 51, in 
    from ufo2ft.util import (
  File "/lib/python3.11/site-packages/ufo2ft/util.py", line 17, in 
    from fontTools.pens.filterPen import DecomposingFilterPointPen
ImportError: cannot import name 'DecomposingFilterPointPen' from 'fontTools.pens.filterPen' (/lib/python3.11/site-packages/fontTools/pens/filterPen.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/lib/python311.zip/_pyodide/_base.py", line 540, in eval_code_async
    await CodeRunner(
  File "/lib/python311.zip/_pyodide/_base.py", line 363, in run_async
    coroutine = eval(self.code, globals, locals)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 5, in 
  File "/home/pyodide/fbwebapi.py", line 94, in run_fontbakery
    runner.run(reporters)
  File "/lib/python3.11/site-packages/fontbakery/checkrunner.py", line 294, in run
    result = self._run_check(identity)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/fontbakery/checkrunner.py", line 213, in _run_check
    subresults = list(subresults)
                 ^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/fontbakery/checks/shaping.py", line 510, in com_google_fonts_check_dotted_circle
    if is_complex_shaper_font(ttFont):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/fontbakery/checks/shaping.py", line 451, in is_complex_shaper_font
    exit_with_install_instructions("shaping")
  File "/lib/python3.11/site-packages/fontbakery/utils.py", line 29, in exit_with_install_instructions
    sys.exit(
SystemExit: 
To run the shaping profile, one needs to install
fontbakery with the 'shaping' extra, like this:

    python -m pip install -U 'fontbakery[shaping]'