Prepare Martian Grotesk for Google Fonts submission#2
Draft
Prepare Martian Grotesk for Google Fonts submission#2
Conversation
ac60413 to
3d00e71
Compare
Add config.yaml, requirements.txt, AUTHORS.txt, CONTRIBUTORS.txt, .gitignore, and Instructions.txt for Google Fonts compliance. Add build.py that patches glyphsLib Smart Component bugs at runtime (Group key handling + missing masters for UltraBlack) before running gftools builder. Original source is never modified.
Do a set of changes described in the Instructions.txt. Replace designer-named fonts (Cn/Nr/Std/sWd/Wd/xWd/uWd shorthand naming) with GF-spec builds: standard width/weight naming, STAT table, variable font named MartianGrotesk[wdth,wght].ttf, covering 63 statics + VF across 7 widths x 9 weights in TTF, OTF, and WOFF2 formats.
Add sources/build.sh as single-command entry point per Google Fonts upstream guide.
3d00e71 to
f19a75e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preview
Here is stand for testing differences between old fonts and new ones: grotesk-gf-comparison.netlify.app
Overview
Prepares the Martian Grotesk repository for Google Fonts submission by adding the required repo structure, build configuration, and a reproducible build pipeline that produces GF-compliant font binaries.
Problem Statement
Martian Grotesk was originally structured for commercial distribution with a separate design toolchain — abbreviated master/instance names, proprietary variable font naming (
MartianGrotesk-VFVF.ttf), and no Google Fonts metadata. To publish on Google Fonts, the repository needs to conform to GF specs: standardized naming conventions, a proper STAT table, a 2-axis variable font, and a reproducible open-source build process.Additionally, Glyphs 3 Smart Components used extensively in the source are not fully supported by glyphsLib (the open-source converter used by fontmake), requiring a workaround in the build pipeline.
Solution Approach
Follows the same approach used for Martian Mono (already published on Google Fonts), adapted for Grotesk's wider design space (7 widths × 9 weights vs Mono's 4 × 8). See mono/sources/Instructions.txt for the original two-file workflow this is based on.
sources/config.yamlwith STAT table definitions covering all 7 widths (Condensed→UltraExpanded) and 9 weights (Thin→UltraBlack) per GF requirements. Modeled after mono/sources/config.yamlsources/MartianGrotesk.glyphs— a GF-compliant copy of the designer source with renamed masters (e.g.Cn Th→Condensed Thin), GF-standard instances, updated font metadata (copyright, license, variable font origin), andrligfeature deactivated (same issue as Mono — fontmake doesn't support conditional glyph substitution viarlig+Rename Glyphs)sources/build.py— a build script that works around two glyphsLib bugs before invokinggftools builder: strips theGrouppiece-grouping key from smart component values (not a real axis, glyphsLib bug), and patches glyphsLib to gracefully handle missing smart component masters for the UltraBlack extremes. Smart component interpolation is otherwise fully preserved. Mono doesn't need this workaround as it doesn't use Smart Componentssources/Instructions.txtdocumenting the two-file workflow (designer file vs GF file), master renaming table, Glyphs.app modification checklist, and build setup/usage instructionsAUTHORS.txt,CONTRIBUTORS.txt,requirements.txt,.gitignoreper GF upstream repo requirementsMartianGrotesk-VFVF.ttf) with 63 GF-compliant statics + variable font (MartianGrotesk[wdth,wght].ttf) in TTF, OTF, and WOFF2 formatsBreaking Changes
Font file names have changed across all formats:
MartianGrotesk-StdRg.ttf) → standard names (MartianGrotesk-Regular.ttf,MartianGroteskCondensed-Regular.ttf, etc.)MartianGrotesk-VFVF.ttf→MartianGrotesk[wdth,wght].ttfTesting
python sources/build.pywith no errors