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

Add more defcon compatibility APIs for better interoperability #41

Open
benkiel opened this issue Nov 12, 2019 · 4 comments
Open

Add more defcon compatibility APIs for better interoperability #41

benkiel opened this issue Nov 12, 2019 · 4 comments

Comments

@benkiel
Copy link

benkiel commented Nov 12, 2019

ufoLib2er's: noticed this:

https://github.com/googlefonts/ufo2ft/blob/2712e023567d6cc407bc1569da5fb3867d8fb970/Lib/ufo2ft/filters/sortContours.py#L38-L42

Is there a functional reason for ufoLib2 to not be following the established defcon API here? I understand the defcon speed issue, just talking about the API in this case. Seems like ufoLib2 could add appendContour at the glyph level and one wouldn't need to be aware of edge cases like the above, and that would benefit all.

@madig
Copy link
Collaborator

madig commented Nov 12, 2019

I think it simply wasn't needed for compatibility before. I suppose it could be added. Cosimo also noted that I could be using pens to stay mildly more API agnostic. Hm.

@madig madig changed the title API shift Add more defcon compatibility APIs for better interoperability Nov 14, 2019
@benkiel
Copy link
Author

benkiel commented Dec 13, 2019

Just want to strongly voice that having ufoLib2 API compatible with defcon is a very good thing. It allows one two swap in/out depending on specific need, doesn't fragment the tool space, and is keeps a well understood way of working. If ufoLib2 wants additional features, that's great, but a baseline compatibility should be a goal of the project, imho.

@anthrotype
Copy link
Member

I agree in general. In particular this appendContour could be easily added.
Less so with things like Font(path) (defcon) vs Font.open(path) (ufoLib2), given we use attrs data classes with their default constructors. But maybe we could think of some tricks.

@madig
Copy link
Collaborator

madig commented Dec 13, 2019

I think the Font.open can stay as is. There could be a ufoLib2.DefconFont function that hides the difference :)

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

3 participants