Skip to content

Prepare Martian Grotesk for Google Fonts submission#2

Draft
psd-coder wants to merge 3 commits intomainfrom
prepare-gf-build
Draft

Prepare Martian Grotesk for Google Fonts submission#2
psd-coder wants to merge 3 commits intomainfrom
prepare-gf-build

Conversation

@psd-coder
Copy link
Member

@psd-coder psd-coder commented Mar 22, 2026

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.

  • Added sources/config.yaml with STAT table definitions covering all 7 widths (Condensed→UltraExpanded) and 9 weights (Thin→UltraBlack) per GF requirements. Modeled after mono/sources/config.yaml
  • Added sources/MartianGrotesk.glyphs — a GF-compliant copy of the designer source with renamed masters (e.g. Cn ThCondensed Thin), GF-standard instances, updated font metadata (copyright, license, variable font origin), and rlig feature deactivated (same issue as Mono — fontmake doesn't support conditional glyph substitution via rlig + Rename Glyphs)
  • Added sources/build.py — a build script that works around two glyphsLib bugs before invoking gftools builder: strips the Group piece-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 Components
  • Added sources/Instructions.txt documenting the two-file workflow (designer file vs GF file), master renaming table, Glyphs.app modification checklist, and build setup/usage instructions
  • Added AUTHORS.txt, CONTRIBUTORS.txt, requirements.txt, .gitignore per GF upstream repo requirements
  • Replaced 63 designer-named static fonts + broken VF (MartianGrotesk-VFVF.ttf) with 63 GF-compliant statics + variable font (MartianGrotesk[wdth,wght].ttf) in TTF, OTF, and WOFF2 formats

Breaking Changes

Font file names have changed across all formats:

  • Static fonts: abbreviated names (MartianGrotesk-StdRg.ttf) → standard names (MartianGrotesk-Regular.ttf, MartianGroteskCondensed-Regular.ttf, etc.)
  • Variable font: MartianGrotesk-VFVF.ttfMartianGrotesk[wdth,wght].ttf

Testing

  • Built all 63 statics + variable font via python sources/build.py with no errors
  • Verified glyph rendering at multiple weights/widths — smart component interpolation (stems, descender tails, currency strokes) confirmed correct across the design space

@psd-coder psd-coder self-assigned this Mar 22, 2026
@psd-coder psd-coder force-pushed the prepare-gf-build branch 2 times, most recently from ac60413 to 3d00e71 Compare March 24, 2026 21:23
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.
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.

1 participant