Gue3bara / Cairo

Cairo is a contemporary Arabic and Latin typeface family. Mohamed Gaber extended the famous Latin typeface family Titillum Web to support the Arabic script, with a design that is based on the Kufi calligraphic style.
SIL Open Font License 1.1
168 stars 22 forks source link

Cairo.glyphs from commit 1fd5c45 breaks the build script #54

Closed eliheuer closed 4 years ago

eliheuer commented 4 years ago

Building Cairo.glyphs from commit 1fd5c45 with the fontmake build script gives the the error KeyError: "glyph named 'Oslash.BRACKET.80' already exists":

[INFO] Building Cairo.glyphs VFs with Fontmake...
Traceback (most recent call last):
  File "/Users/Air/Py/Venvs/type/bin/fontmake", line 8, in <module>
    sys.exit(main())
  File "/Users/Air/Py/Venvs/type/lib/python3.7/site-packages/fontmake/__main__.py", line 425, in main
    project.run_from_glyphs(glyphs_path, **args)
  File "/Users/Air/Py/Venvs/type/lib/python3.7/site-packages/fontmake/font_project.py", line 670, in run_from_glyphs
    write_skipexportglyphs=write_skipexportglyphs,
  File "/Users/Air/Py/Venvs/type/lib/python3.7/site-packages/fontTools/misc/loggingTools.py", line 375, in wrapper
    return func(*args, **kwds)
  File "/Users/Air/Py/Venvs/type/lib/python3.7/site-packages/fontmake/font_project.py", line 156, in build_master_ufos
    ufo_module=ufoLib2,
  File "/Users/Air/Py/Venvs/type/lib/python3.7/site-packages/glyphsLib/builder/__init__.py", line 111, in to_designspace
    return builder.designspace
  File "/Users/Air/Py/Venvs/type/lib/python3.7/site-packages/glyphsLib/builder/builders.py", line 279, in designspace
    self._apply_bracket_layers()
  File "/Users/Air/Py/Venvs/type/lib/python3.7/site-packages/glyphsLib/builder/builders.py", line 431, in _apply_bracket_layers
    self._copy_bracket_layers_to_ufo_glyphs(bracket_layer_map)
  File "/Users/Air/Py/Venvs/type/lib/python3.7/site-packages/glyphsLib/builder/builders.py", line 470, in _copy_bracket_layers_to_ufo_glyphs
    ufo_glyph = ufo_layer.newGlyph(ufo_glyph_name)
  File "/Users/Air/Py/Venvs/type/lib/python3.7/site-packages/ufoLib2/objects/layer.py", line 160, in newGlyph
    raise KeyError(f"glyph named '{name}' already exists")
KeyError: "glyph named 'Oslash.BRACKET.80' already exists"

We need to fix this and other similar errors before I can update the PR here https://github.com/google/fonts/pull/2380.

eliheuer commented 4 years ago

Turning off export for Oslash, oslash, and dollar fixes all the build errors.

Gue3bara commented 4 years ago

@eliheuer I will check it now to see what's the problem exactly

Gue3bara commented 4 years ago

@eliheuer I checked the three glyphs causing the issue and I think I solved the issue now by amending the bracket layer names

eliheuer commented 4 years ago

Great thanks, I think lots of them just had naming issue. I believe the bracket layers should just always have the same name as the parent layers, like this, but I'm not %100 sure.

layers

eliheuer commented 4 years ago

It looks like this is fixed at commit dbff50f316de2654dbb07534e5619585b7cacb2c, thanks. Closing this now.