googlefonts / googlefonts/fontmake

Removing overlaps on quadratic outlines should print intelligible error message if not supported

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

Description

1. Clone https://github.com/daltonmaag/ubuntu
2. `fontmake -u source/Ubuntu-R.ufo/`
```
INFO:fontmake.font_project:Building OTFs
INFO:fontmake.font_project:Decomposing glyphs for Ubuntu-Bold
INFO:fontmake.font_project:Removing overlaps for Ubuntu-Bold
Traceback (most recent call last):
File "/home/nikolaus/.local/bin/fontmake", line 11, in
sys.exit(main())
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontmake/__main__.py", line 195, in main
ufo_paths, is_instance=args.pop('masters_as_instances'), **args)
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontmake/font_project.py", line 473, in run_from_ufos
ufos, remove_overlaps, **kwargs)
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontmake/font_project.py", line 174, in build_otfs
self.remove_overlaps(ufos)
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontTools/misc/loggingTools.py", line 372, in wrapper
return func(*args, **kwds)
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontmake/font_project.py", line 115, in remove_overlaps
union(contours, glyph.getPointPen())
File "/home/nikolaus/.local/lib/python3.6/site-packages/booleanOperations/booleanOperationManager.py", line 104, in union
return _performOperation("union", contours, [], outPen)
File "/home/nikolaus/.local/lib/python3.6/site-packages/booleanOperations/booleanOperationManager.py", line 64, in _performOperation
subjectInputContours = [InputContour(contour) for contour in subjectContours if contour and len(contour) > 1]
File "/home/nikolaus/.local/lib/python3.6/site-packages/booleanOperations/booleanOperationManager.py", line 64, in
subjectInputContours = [InputContour(contour) for contour in subjectContours if contour and len(contour) > 1]
File "/home/nikolaus/.local/lib/python3.6/site-packages/booleanOperations/flatten.py", line 72, in __init__
self.segments = _convertPointsToSegments(points)
File "/home/nikolaus/.local/lib/python3.6/site-packages/booleanOperations/flatten.py", line 443, in _convertPointsToSegments
willBeReversed=willBeReversed
File "/home/nikolaus/.local/lib/python3.6/site-packages/booleanOperations/flatten.py", line 174, in __init__
for pt1, pt2 in decomposeQuadraticSegment(pointCoordinates[1:]):
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontTools/pens/basePen.py", line 360, in decomposeQuadraticSegment
assert n > 0
AssertionError
```

Using `fontmake --keep-overlaps --no-production-names --keep-direction -o ttf -u source/Ubuntu-R.ufo/` works, but what causes the failure in the default configuration?

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.