-
Notifications
You must be signed in to change notification settings - Fork 72
wip: gen-statics added #309
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
Conversation
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
First update in a while. My new plan is to allow designers to include static instances in the builder config files e.g: sources:
- MavenPro.glyphs
includeSourceFixes: true
outputDir: "../fonts"
instances:
MavenPro[wght].ttf:
- styleName: "Regular"
coordinates:
wght: 400
- styleName: "Medium"
coordinates:
wght: 500
- styleName: "SemiBold"
coordinates:
wght: 600
- styleName: "Bold"
coordinates:
wght: 700
My current implementation doesn't use the stat table or insane cross products. Atm, designers will need to specify the names and coordinates for each instance. This PR will just ensure that the name table, fsSelection and macStyle comply to our spec. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@simoncozens I think this is ready, mind taking a quick look? This feature is useful because it allows users to generate static fonts which are independent from the designspace source files. At Google Fonts, we only allow 18 fvar instances which only include wght + ital axes e.g "Bold", "Bold Italic". In fonts like Recursive which have a tonne of cool axes, having only 18 fonts isn't great. One could argue that we could have separate designspace sources for the static fonts but I feel this is inferior and doesn't remove the duplication. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
1 similar comment
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
3 similar comments
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent |
Lib/gftools/instancer.py
Outdated
def gen_static_font( | ||
var_font, family_name, style_name, axes, keep_overlaps=False, dst=None | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The signature could be gen_static_font(var_font, axes, family_name=None, style_name=None, keep_overlaps=Fase, dst=None)
considering instantiateVariableFont() will have a family_name
parameter in fonttools/fonttools#2189.
Should the axes
argument be called axis_values
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
I've updated the signature as per your recommendation. However, we still need to update the name table using our own name table updater since GF style names can only have wght+ital tokens. The fontTools instancer doesn't have this restriction.
Should the axes argument be called axis_values?
This may cause some confusion since some users may think they need to supply STAT AxisValues, which isn't what we're doing. Perhaps axis_coordinates
is a better arg name?
Tests are failing because we've just merged the fontTools PR. Once a new release is cut, the tests should pass.
LGTM |
This is a followup to pull request #264 that was automatically closed by mistake when this project renamed its "master" branch to "main".
Be sure to also read all the comments posted in the original PR (#264)
Original PR description as submitted on Oct 26, 2020 by @m4rc1e:
Generate static fonts from a variable font using its STAT table.
I can't merge this until #262 is finished. I'll then need to cleanup and remove some of the duplication in this script.
Be sure to also read all the comments posted in the original PR (#264)