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 “seen pairs” list to UFO #186

Open
cjdunn opened this issue Jul 29, 2021 · 10 comments
Open

Add “seen pairs” list to UFO #186

cjdunn opened this issue Jul 29, 2021 · 10 comments
Labels
considering Specification change under consideration. proposal Proposed specification change. workingGroup Future proposal being worked on in a small group

Comments

@cjdunn
Copy link

cjdunn commented Jul 29, 2021

As referenced here: https://twitter.com/typesupply/status/1420812198671224836?s=20

It would be helpful to know if I've looked at a kern pair and decided to keep it as zero, vs a pair that I haven't looked at yet.

This would also be helpful for cases when I interpolate kerning to use as a starting point for another source (master). I often interpolate/copy kerning as a starting point. If a seen pairs list was available, I would import the interpolated kerning and clear the list of seen pairs. Then as I go through each pair, the kerning extension (like Metrics Machine) could mark the pairs as seen.

I could also query this list at the end of the kerning process for all UFOs to see if I imported kerns into a UFO that I haven't seen yet, eg alternates that aren't in my kerning lists, or a chunk that I didn't go through yet.

Thank you for your consideration!

@benkiel
Copy link
Contributor

benkiel commented Jul 29, 2021

Could this be a font level lib key?

@justvanrossum
Copy link
Contributor

Yeah, lib.

@typesupply
Copy link
Contributor

typesupply commented Jul 29, 2021

I'm thinking /data instead of lib since it's a potentially massive amount of data.


I suggested bringing the discussion here because, as CJ points out, it touches on a number of potential uses. A kerning interface, an interpolation script, a feature generator, etc. @LettError has requested storage in the font.lib of a list of pairs seen/approved in MetricsMachine so that, as best as I can recall, the pairs can be ignored later. The question for me is "What does seen mean?" In the context of MetricsMachine, it would mean "was looked at with a human eye" but that's a very limited meaning of the term.

We've touched on the idea of metadata for kerning pairs in the past so maybe this is more evidence of a need for that. Perhaps there could be a file located at /data/something.kerningdata.yamlOrJsonOrPlistOrDotDotDot that has a structure like this:

{
   pair : {
    key : data
   }
}

Basically, a lib for pairs. We could have the same key/value rules as lib and define public keys.

I don't think this should be fast tracked to be an official part of the spec. I think if there is a sense of need, we could think through the structure, document it as an unofficial thing and then see where it goes.

@cjdunn
Copy link
Author

cjdunn commented Jul 29, 2021

Thank you all for chiming in!

I'm going to try using a private lib for this for now: com.cjType.seenPairs . I added a few lines of code to do this using my RF extension MM2SpaceCenter, which is already paying attention to MetricsMachine.currentPairChanged and metricsMachine.GetCurrentPair()

I'm not sure if I'll need to store the parent group for each glyph in the pair if it exists. Or if I just figure that out later. For now I'm going to try storing that too in a separate lib: com.cjType.seenPairsWithGroups If it gets to be too much/slow I might reconsider. I do think it will be helpful to know when I've already seen a glyph from this group to know if I need an exception.

If anyone else wants to try the dev version of my extension, let me know. Or any other suggestions would be much appreciated, thanks!

@cjdunn
Copy link
Author

cjdunn commented Jul 29, 2021

@typesupply I'm not familiar with using /data, is there a way to read/write this already via fontparts? Or is this something for the future?

@benkiel
Copy link
Contributor

benkiel commented Jul 30, 2021

I need to check, I'm not 100% that font parts reads data currently...

@typemytype
Copy link
Contributor

fontParts has indeed not yet support for data see robotools/fontParts#439

@benkiel benkiel added considering Specification change under consideration. proposal Proposed specification change. workingGroup Future proposal being worked on in a small group labels Jan 21, 2022
@drj11
Copy link

drj11 commented Jun 10, 2022

Fonts with multiple collaborators / reviewers would presumably want to know who had looked at each kerning pair (or triple), and with what software.

The general principle is sound, but surely this is tool-specific lib stuff.

@LettError
Copy link
Contributor

Lib stuff. But we could agree on a key and some sort of data structure.

@benkiel
Copy link
Contributor

benkiel commented Jun 11, 2022

Yes, lib or data with a recommended key that is not part of spec. I should have closed this a while ago perhaps, but left it open for a informal recommendation on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
considering Specification change under consideration. proposal Proposed specification change. workingGroup Future proposal being worked on in a small group
Projects
None yet
Development

No branches or pull requests

7 participants