googlefonts / googlefonts/fontmake

error in VF generate from glyphs source

Open
#1,039 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
888
Forks
97
Avg merge
4d 52m
Merged PRs (30d)
1

Description

Hi
with [this ](https://github.com/aminabedi68/Dabir/tree/main/Source)source i see this error log:
```
C:\Users\cyber\Downloads>fontmake -o variable -g Dabir.glyphs
INFO:fontmake.font_project:Building master UFOs and designspace from Glyphs source
INFO:glyphsLib.parser:Parsing .glyphs file
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Users\cyber\AppData\Local\Programs\Python\Python311\Scripts\fontmake.exe\__main__.py", line 7, in
File "C:\Users\cyber\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontmake\__main__.py", line 656, in main
project.run_from_glyphs(inputs.glyphs_path, **args)
File "C:\Users\cyber\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontmake\font_project.py", line 823, in run_from_glyphs
designspace_path = self.build_master_ufos(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cyber\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontTools\misc\loggingTools.py", line 375, in wrapper
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\cyber\AppData\Local\Programs\Python\Python311\Lib\site-packages\fontmake\font_project.py", line 223, in build_master_ufos
designspace = glyphsLib.to_designspace(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cyber\AppData\Local\Programs\Python\Python311\Lib\site-packages\glyphsLib\builder\__init__.py", line 130, in to_designspace
return builder.designspace
^^^^^^^^^^^^^^^^^^^
File "C:\Users\cyber\AppData\Local\Programs\Python\Python311\Lib\site-packages\glyphsLib\builder\builders.py", line 334, in designspace
list(self.masters) # Make sure that the UFOs are built
^^^^^^^^^^^^^^^^^^
File "C:\Users\cyber\AppData\Local\Programs\Python\Python311\Lib\site-packages\glyphsLib\builder\builders.py", line 209, in masters
self.to_ufo_font_attributes(self.family_name) # .font
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cyber\AppData\Local\Programs\Python\Python311\Lib\site-packages\glyphsLib\builder\font.py", line 56, in to_ufo_font_attributes
self.to_ufo_custom_params(ufo, font) # .custom_params
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cyber\AppData\Local\Programs\Python\Python311\Lib\site-packages\glyphsLib\builder\custom_params.py", line 1073, in to_ufo_custom_params
handler.to_ufo(self, glyphs_proxy, ufo_proxy)
File "C:\Users\cyber\AppData\Local\Programs\Python\Python311\Lib\site-packages\glyphsLib\builder\custom_params.py", line 247, in to_ufo
ufo_value = self.value_to_ufo(glyphs_value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cyber\AppData\Local\Programs\Python\Python311\Lib\site-packages\glyphsLib\builder\custom_params.py", line 528, in to_ufo_gasp_table
value = {int(k): int(v) for k, v in value.items()}
^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'items'
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported `fontmake -o variable -g Dabir.glyphs` command using the linked Dabir source. Start at `glyphsLib/builder/custom_params.py`, especially `to_ufo_gasp_table`, and trace the failing conversion; done means the source builds successfully or the input problem is reported clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.