googlefonts / googlefonts/fontmake

AssertionError with open contours when removing overlaps

Open
#354 13 comments 0 reactions 1 assignee Claimed by @anthrotype View on GitHub
Dominant language
Python
Stars
888
Forks
97
Avg merge
4d 52m
Merged PRs (30d)
1

Description

Hello,

While trying to generate OTFs for Noto Serif Kannada from a Glyphs source (cubic outlines) I get the following error:

```
INFO:fontmake.font_project:Building master UFOs and designspace from Glyphs source
INFO:glyphsLib:Parsing .glyphs file
INFO:glyphsLib:Casting parsed values
INFO:glyphsLib:Loading to UFOs
INFO:glyphsLib.util:Writing master_ufo/NotoSerifKannada-Light.ufo
INFO:glyphsLib.util:Writing master_ufo/NotoSerifKannada-Regular.ufo
INFO:glyphsLib.util:Writing master_ufo/NotoSerifKannada-SemiBold.ufo
INFO:glyphsLib.util:Writing master_ufo/NotoSerifKannada-Bold.ufo
Took 10.869s to run 'build_master_ufos'
INFO:fontmake.font_project:Interpolating master UFOs from designspace
INFO:mutatorMath:Reading master_ufo/NotoSerifKannada.designspace
INFO:mutatorMath: Generating instance NotoSerifKannada-Thin.ufo
INFO:mutatorMath: Generating instance NotoSerifKannada-ExtraLight.ufo
INFO:mutatorMath: Generating instance NotoSerifKannada-Light.ufo
INFO:mutatorMath: Generating instance NotoSerifKannada-Regular.ufo
INFO:mutatorMath: Generating instance NotoSerifKannada-Medium.ufo
INFO:mutatorMath: Generating instance NotoSerifKannada-SemiBold.ufo
INFO:mutatorMath: Generating instance NotoSerifKannada-Bold.ufo
INFO:mutatorMath: Generating instance NotoSerifKannada-ExtraBold.ufo
INFO:mutatorMath: Generating instance NotoSerifKannada-Black.ufo
INFO:fontmake.font_project:Building OTFs
INFO:fontmake.font_project:Decomposing glyphs for NotoSerifKannada-Thin
INFO:fontmake.font_project:Decomposing glyphs for NotoSerifKannada-ExtraLight
INFO:fontmake.font_project:Decomposing glyphs for NotoSerifKannada-Light
INFO:fontmake.font_project:Decomposing glyphs for NotoSerifKannada-Regular
INFO:fontmake.font_project:Decomposing glyphs for NotoSerifKannada-Medium
INFO:fontmake.font_project:Decomposing glyphs for NotoSerifKannada-SemiBold
INFO:fontmake.font_project:Decomposing glyphs for NotoSerifKannada-Bold
INFO:fontmake.font_project:Decomposing glyphs for NotoSerifKannada-ExtraBold
INFO:fontmake.font_project:Decomposing glyphs for NotoSerifKannada-Black
Took 23.512s to run 'decompose_glyphs'
INFO:fontmake.font_project:Removing overlaps for NotoSerifKannada-Thin
Traceback (most recent call last):
File "/Users/employee-1/Documents/_Code/fntmk/bin/fontmake", line 11, in
sys.exit(main())
File "/Users/employee-1/Documents/_Code/fntmk/lib/python2.7/site-packages/fontmake/__main__.py", line 183, in main
project.run_from_glyphs(glyphs_path, **args)
File "/Users/employee-1/Documents/_Code/fntmk/lib/python2.7/site-packages/fontmake/font_project.py", line 378, in run_from_glyphs
designspace_path, instance_data=instance_data, **kwargs)
File "/Users/employee-1/Documents/_Code/fntmk/lib/python2.7/site-packages/fontmake/font_project.py", line 434, in run_from_designspace
interpolate_layout_from=interpolate_layout_from, **kwargs)
File "/Users/employee-1/Documents/_Code/fntmk/lib/python2.7/site-packages/fontmake/font_project.py", line 473, in run_from_ufos
ufos, remove_overlaps, **kwargs)
File "/Users/employee-1/Documents/_Code/fntmk/lib/python2.7/site-packages/fontmake/font_project.py", line 174, in build_otfs
self.remove_overlaps(ufos)
File "/Users/employee-1/Documents/_Code/fntmk/lib/python2.7/site-packages/fontTools/misc/loggingTools.py", line 372, in wrapper
return func(*args, **kwds)
File "/Users/employee-1/Documents/_Code/fntmk/lib/python2.7/site-packages/fontmake/font_project.py", line 115, in remove_overlaps
union(contours, glyph.getPointPen())
File "/Users/employee-1/Documents/_Code/fntmk/lib/python2.7/site-packages/booleanOperations/booleanOperationManager.py", line 104, in union
return _performOperation("union", contours, [], outPen)
File "/Users/employee-1/Documents/_Code/fntmk/lib/python2.7/site-packages/booleanOperations/booleanOperationManager.py", line 64, in _performOperation
subjectInputContours = [InputContour(contour) for contour in subjectContours if contour and len(contour) > 1]
File "/Users/employee-1/Documents/_Code/fntmk/lib/python2.7/site-packages/booleanOperations/flatten.py", line 68, in __init__
contour.drawPoints(pointPen)
File "/Users/employee-1/Documents/_Code/fntmk/lib/python2.7/site-packages/defcon/objects/contour.py", line 603, in drawPoints
pointPen.addPoint((point.x, point.y), segmentType=point.segmentType, smooth=point.smooth, name=point.name, identifier=point.identifier)
File "/Users/employee-1/Documents/_Code/fntmk/lib/python2.7/site-packages/booleanOperations/flatten.py", line 346, in addPoint
assert segmentType != "move"
AssertionError
```
Any help is appreciated :)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.