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

How is the "default" of an axis determined? #682

Open
arrowtype opened this issue Apr 14, 2021 · 5 comments
Open

How is the "default" of an axis determined? #682

arrowtype opened this issue Apr 14, 2021 · 5 comments

Comments

@arrowtype
Copy link

Problem

I am building a font from one Glyphs source that is Roman and a second that is Italic.

The Italic VF was getting a default location of wght=400, as expected. However, the Roman VF was getting a default location of wght=100, which is the lightest master, but not what I wanted or expected, because it also had a "Regular" master.

Question

The Glyphs source is transformed into UFOs and a designspace. The designspace gets an axis definition like this:

<axis tag="wght" name="Weight" minimum="100" maximum="800" default="100">
  • What logic is used to determine that default value?
  • Why might it be different from the Italic Glyphs source?
    • Could it be that the Italic instance is marked for style-linking, while the Roman Regular instance is not (because there is no way to mark it as "Regular" in that section, presumably because it’s redundant with the weight menu above?

image

Current solution

It seems that if I add an Axis Location custom parameter to the Regular master in the Roman Glyphs source, it gets picked up as the default location.

image

It seems like maybe this could be logically inferred by glyphsLib, or at least that it should guess in the same way between the similar Roman & Italic sources.

I am mostly filing this issue so that others (including my future self) can find it if they have the same question and are looking for a workaround. However, it would potentially be worth solving in the library itself. So, maintainers – feel free to close or leave open this issue as you see fit.

Thank you!

@schriftgestalt
Copy link
Collaborator

The default position is the axis position of the masters that is used to generate the glyf table. Changing the numbers with an Axis Location parameter has nothing to do with determining the default value as it applies to all masters.

@arrowtype
Copy link
Author

Thanks for the reply!

an Axis Location parameter has nothing to do with determining the default value

Hmm, that is strange, as it did seem to change the outcome in this case... but maybe I changed something else without realizing it.

Is there some other more reliable way to set the axis default, other than editing the generated designspace file?

@schriftgestalt
Copy link
Collaborator

I didn’t mean that is wouldn’t change the outcome. Just that is has a broader impact. You would most likely need that parameter for all other masters, too. What are the axis values of the master in the upright and the Italic file?

@arrowtype
Copy link
Author

Is there a better way to copy that info into a comment, other than zipping the files (which I can’t do on this project)?

Here are the two regular-weight masters, if that’s all you were curious about:

image

@schriftgestalt
Copy link
Collaborator

This looks good. You don’t need the "Axis Location" parameter as it contains the same values as the axes coordinates. That parameter is meant to change that (e.g. if you use the stem width as weight coordinates).
You should add a "Variable Font Origin" Parameter in the font settings and select the Regular master. That will make sure this master will be the default.

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