googlefonts / noto-emoji

Noto Emoji fonts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build fails

behdad opened this issue · comments

I've followed the build instructions from BUILD.md. The following step fails:

(cd colrv1 && rm -rf build/ && time nanoemoji *.toml)

with multiple errors like this:

FAILED: picosvg/clipped/emoji_u1f4f0.svg 
picosvg  --clip_to_viewbox --output_file picosvg/clipped/emoji_u1f4f0.svg ../../svg/emoji_u1f4f0.svg
Traceback (most recent call last):
  File "/home/behdad/noto-emoji/venv/bin/picosvg", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/picosvg/picosvg.py", line 76, in main
    app.run(_run, argv=argv)
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
             ^^^^^^^^^^
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/picosvg/picosvg.py", line 58, in _run
    svg = svg.topicosvg(
          ^^^^^^^^^^^^^^
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/picosvg/svg.py", line 1337, in topicosvg
    svg.topicosvg(
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/picosvg/svg.py", line 1361, in topicosvg
    self.simplify(inplace=True)
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/picosvg/svg.py", line 813, in simplify
    self._simplify()
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/picosvg/svg.py", line 745, in _simplify
    paths = list(self._stroke(paths[0]))
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/picosvg/svg.py", line 825, in _stroke
    stroke = shape.as_path().update_path(shape.stroke_commands(self.tolerance))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/picosvg/svg_types.py", line 696, in update_path
    for cmd, args in svg_cmds:
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/picosvg/svg_pathops.py", line 101, in svg_commands
    for svg_cmd, svg_args in _SKIA_CMD_TO_SVG_CMD[cmd](points):
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/picosvg/svg_pathops.py", line 55, in _qcurveto_to_svg
    yield ("Q", control_pt + end_pt)
                ~~~~~~~~~~~^~~~~~~~
TypeError: can only concatenate tuple (not "NoneType") to tuple
[3031/7445] /home/behdad/noto-emoji...on picosvg/clipped/emoji_u1f4e0.svg
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/behdad/noto-emoji/venv/bin/nanoemoji", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/nanoemoji/nanoemoji.py", line 761, in main
    app.run(_run)
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
             ^^^^^^^^^^
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/nanoemoji/nanoemoji.py", line 756, in _run
    maybe_run_ninja(build_file)
  File "/home/behdad/noto-emoji/venv/lib64/python3.11/site-packages/nanoemoji/ninja.py", line 125, in maybe_run_ninja
    subprocess.run(ninja_cmd, check=True)
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-C', '/home/behdad/noto-emoji/colrv1/build']' returned non-zero exit status 1.

==

Another minor issue, with the build instructions:

# If you are updating to a new Unicode rev, update configs
(cd colrv1 && python colrv1_generate_configs.py)
git diff colrv1/*.toml

This doesn't work. The colrv1_generate_configs.py is in the repo root, not in the colrv1 directory.

sorry, known issue: googlefonts/nanoemoji#455

I need to update picosvg to take into account special qCurveTo with None oncurve (offcurve-only closed Truetype splines) that new skia-pathops is now returning, the workaround is to pin skia-pathops to previous release pip install skia-pathops==0.7.4

Let's keep it open in case others stumble on this, until I fix the issue in picosvg

the workaround is to pin skia-pathops to previous release pip install skia-pathops==0.7.4

That seems to work. Thanks.

this should be now fixed with the latest picosvg 0.22.1
https://github.com/googlefonts/picosvg/releases/tag/v0.22.1

you no longer need to pin skia-pathops, but can now also use the latest one.

I trust you it works. :)