Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError raised instead of BooleanOperationsError #62

Open
moyogo opened this issue Mar 29, 2021 · 11 comments
Open

ValueError raised instead of BooleanOperationsError #62

moyogo opened this issue Mar 29, 2021 · 11 comments

Comments

@moyogo
Copy link
Contributor

moyogo commented Mar 29, 2021

This is a followup to googlefonts/ufo2ft#492 (comment)

booleanOperations should probably raise a BooleanOperationsError instead of a ValueError with the two glyphs taken from https://github.com/googlefonts/festive:
https://github.com/googlefonts/ufo2ft/files/6221735/OutlineTest.ufo.zip

@typemytype
Copy link
Owner

this is an edge case...

and the spec allows this https://unifiedfontobject.org/versions/ufo3/glyphs/glif/#point-types

If the number of offcurve points is zero, a straight line is drawn.

BooleanOperation should treat it like a line segment...

image

@anthrotype
Copy link
Collaborator

@moyogo who/what tool created that ufo?

@moyogo
Copy link
Contributor Author

moyogo commented May 21, 2021

@anthrotype Festive has the issue in the Glyphs files, the issue isn't created when glyphsLib generates the UFOs.

@anthrotype
Copy link
Collaborator

I don't understand. You tried running booleanOperations from within Glyphs.app? Or on a UFO exported from Glyphs.app?
I'm just curious to know how widespread these are, and in what circumestances they appear. I would go as far as potentially deprecating this in a future UFO version, as it just complicates parsing the outlines.

@moyogo
Copy link
Contributor Author

moyogo commented May 21, 2021

I don't understand. You tried running booleanOperations from within Glyphs.app? Or on a UFO exported from Glyphs.app?

Neither. Fontmake was used on the Glyphs file.

@anthrotype
Copy link
Collaborator

So you saying that the .glyphs source itself contains curve segments without offcurve points. Is that even legal for Glyphs.app?

@moyogo
Copy link
Contributor Author

moyogo commented May 21, 2021

@vv-monsalve Did Festive have Glyphs sources initially or did they come from a different format?

@moyogo
Copy link
Contributor Author

moyogo commented May 21, 2021

@anthrotype the outlines were definitely broken in Glyphs.app so it's not valid there.

@moyogo
Copy link
Contributor Author

moyogo commented May 21, 2021

The issue is not that the outlines are bad, but that a meaningful error should be raised when it is the case.

@anthrotype
Copy link
Collaborator

well, actually they are valid at least according to the current UFO spec, as frederik pointed out above.

@vv-monsalve
Copy link

@vv-monsalve Did Festive have Glyphs sources initially or did they come from a different format?

The designer provided Glyphs sources, although I understand they used to be Fontlab files originally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants