8000 wip: gen-statics added by felipesanches · Pull Request #309 · googlefonts/gftools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 13 commits into from
Mar 1, 2021
Merged

wip: gen-statics added #309

merged 13 commits into from
Mar 1, 2021

Conversation

felipesanches
Copy link
Member
@felipesanches felipesanches commented Jan 23, 2021

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)

@google-cla
Copy link
google-cla bot commented Jan 23, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@felipesanches felipesanches marked this pull request as draft January 23, 2021 17:36
@google-cla
Copy link
google-cla bot commented Feb 16, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@m4rc1e
Copy link
Collaborator
m4rc1e commented Feb 16, 2021

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.

cc @vv-monsalve, @RosaWagner

@google-cla
Copy link
google-cla bot commented Feb 17, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@m4rc1e
Copy link
Collaborator
m4rc1e commented Feb 17, 2021

@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.

@google-cla
Copy link
google-cla bot commented Feb 17, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

1 similar comment
@google-cla
Copy link
google-cla bot commented Feb 22, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link
google-cla bot commented Feb 22, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

3 similar comments
@google-cla
Copy link
google-cla bot commented Feb 23, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link
google-cla bot commented Feb 23, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link
google-cla bot commented Feb 23, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link
google-cla bot commented Feb 24, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@m4rc1e
Copy link
Collaborator
m4rc1e commented Feb 24, 2021

@googlebot I consent

Comment on lines 8 to 10
def gen_static_font(
var_font, family_name, style_name, axes, keep_overlaps=False, dst=None
):
Copy link
Contributor

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?

Copy link
Collaborator

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.

@moyogo
Copy link
Contributor
moyogo commented Mar 1, 2021

LGTM

@m4rc1e m4rc1e marked this pull request as ready for review March 1, 2021 10:12
@m4rc1e m4rc1e merged commit 4767e5c into googlefonts:main Mar 1, 2021
@m4rc1e m4rc1e deleted the gen-statics branch March 1, 2021 10:13
@m4rc1e m4rc1e mentioned this pull request Mar 1, 2021
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

Successfully merging this pull request may close these issues.

3 participants
0