googlefonts / nanoemoji

A wee tool to build color fonts.
Apache License 2.0
239 stars 19 forks source link

SVG files that cause non-successful font build when using glyf_colr_0/glyf_colr_1 color format #463

Closed DeltaRazero closed 1 year ago

DeltaRazero commented 1 year ago

Not entirely sure what causes nanoemoji to error when building the font. Could maybe be something that Adobe Illustrator and Inkscape add some kind of data that nanoemoji doesn't seem to understand but other glyph font generators have no problem with.

Despite trying to get logging I'm only greeted with the following and I can't really seem to get actual logging out of the Ninja build process.

Traceback (most recent call last):
  File "/usr/local/bin/nanoemoji", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/nanoemoji/nanoemoji.py", line 761, in main
    app.run(_run)
  File "/usr/local/lib/python3.10/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/usr/local/lib/python3.10/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "/usr/local/lib/python3.10/site-packages/nanoemoji/nanoemoji.py", line 756, in _run
    maybe_run_ninja(build_file)
  File "/usr/local/lib/python3.10/site-packages/nanoemoji/ninja.py", line 125, in maybe_run_ninja
    subprocess.run(ninja_cmd, check=True)
  File "/usr/local/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-C', '/tmp/glyph_fonts/2Y7Wh/build']' returned non-zero exit status 1.

I've attached a couple of example files that cause the exceptions. Would be nice if the issue could be looked into and subsequently a new release can be published to pypi. Surprisingly CBDT works (as that's the only other thing Chrome/Electron supports) but it's just not sharp enough since it's bitmap graphics. Haven't tested the other color format modes though.

hpp nodejsLock generatedFolder-open Assets-open localeFolder

Additional information:

DeltaRazero commented 1 year ago

So after a bit of investigating it looks like it's an issue with picosvg instead since that can't seem to work with a