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

DigestPointPen questions #12

Open
justvanrossum opened this issue Jan 6, 2018 · 3 comments
Open

DigestPointPen questions #12

justvanrossum opened this issue Jan 6, 2018 · 3 comments

Comments

@justvanrossum
Copy link
Contributor

I'm looking into rewriting DigestPointPen by subclassing RecordingPointPen and have some questions.

I have fixed #8, and see that Adobe uses the getDigestPointsOnly() method. That simply returns a tuple of all points, optionally sorted, without any additional info about point types of contour structure.
https://github.com/adobe-type-tools/afdko/pull/230/files#r159970100

How do other people use DigestPointPen?

I noticed that since robofab, it was enhanced with an identifier argument to beginPath(), and that is added to the digest. However, any additional keyword arguments to addPoint() are ignored, including the identifier keyword arg. The identifier argument to addComponent() is put into the digest.

  • Is the inconsistent handling of identifier on purpose, or is it an oversight?
  • Are identifier values even at all relevant to "digests"?
  • Should the ignoreSmoothAndName flag influence the recording of identifier?

I would really love to come to some consensus about what it is that needs to be digested and for what purposes.

One last thing: the DigestPointStructurePen class doesn't do anything about the identifier argument in beginPath(), so if there is a unigue identifier, then comparing outline structures this way will fail because of that.

@typemytype
Copy link
Member

identifier must be unique (for each glyph...) so its maybe weird to compare digests/structures with identifiers... I guess identifier could be ignore in the digests

@anthrotype
Copy link
Member

actually I don't see the point of that getDigestPointsOnly. What's the use of a list of coordinates (even sorted by default) without information about point types and contour structure? Two completely different glyphs could well get the same digest.

And yes I agree identifiers by definition should be unique so it doesn't make sense to include in the digest.

@miguelsousa pinged me on #7 to publish fontPens on PyPI. @justvanrossum do you think the current issue #12 is a blocker for the release?

@justvanrossum
Copy link
Contributor Author

No, definitely not a blocker.

(I don't see the point of getDigestPointsOnly either.)

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