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

No interface to GSMetrics in object wrapper #49

Open
simoncozens opened this issue Apr 12, 2021 · 2 comments
Open

No interface to GSMetrics in object wrapper #49

simoncozens opened this issue Apr 12, 2021 · 2 comments

Comments

@simoncozens
Copy link
Contributor

There's no documented interface from the Python GSFont object to get the metrics for a Glyphs3 font. I am having to do this:

metrics = Glyphs.font.metrics() # Method call, not property
metrics_names = [ m.name or m.typeName() for m in metrics]

which is fine, but super undocumented.

@schriftgestalt
Copy link
Owner

You would normally access them from the master, or even from the layer (the later would apply the filters, too).

@schriftgestalt
Copy link
Owner

I just added font.metrics and master.metrics to the wrapper. But only as readonly. There are several methods in objC that set those values but I need to find a way to expose them:
in GSFontMaster:

- (GSMetricValue *)setMetricPosition:(CGFloat)pos overshoot:(CGFloat)over type:(GSMetricsType)type name:(GSMetricsKey)name;

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

2 participants