googlefonts / googlefonts/gftools

Feature request: more consistent file outputs between tools

Open
#136 1 comment 4 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
283
Forks
73
Avg merge
21h 25m
Merged PRs (30d)
8

Description

Currently, I'm working on processing roman + italic variable fonts for Google Fonts.

I need to use four gftools for this: `fix-vf-meta`, `fix-nonhinting`, `fix-gasp`, and `fix-dsig`.

I tend to need these gftools in each font I prep for Google Fonts.

A big point of friction for using these is that these four scripts have different (and somewhat hard to predict) file output names.

```
# build stat tables for proper style linking

gftools fix-vf-meta $interUprightVF
gftools fix-vf-meta $interItalicVF

mv ${interUprightVF/".ttf"/".ttf.fix"} $interUprightVF
mv ${interItalicVF/".ttf"/".ttf.fix"} $interItalicVF

# prevent warnings/issues caused by no hinting tables – this fixes the file in-place

gftools fix-nonhinting $interUprightVF $interUprightVF
gftools fix-nonhinting $interItalicVF $interUprightVF

rm ${interUprightVF/".ttf"/"-backup-fonttools-prep-gasp.ttf"}
rm ${interItalicVF/".ttf"/"-backup-fonttools-prep-gasp.ttf"}

# assert google fonts spec for how fonts should rasterize in different contexts

gftools fix-gasp --autofix $interUprightVF
gftools fix-gasp --autofix $interItalicVF

mv ${interUprightVF/".ttf"/".ttf.fix"} $interUprightVF
mv ${interItalicVF/".ttf"/".ttf.fix"} $interItalicVF

# prevent warnings/issues caused by no digital signature tables

gftools fix-dsig --autofix $interUprightVF
gftools fix-dsig --autofix $interItalicVF
```

## Request

Each gftool could have an argument like `--inplace` / `-i` to edit a file and output it with the original name. This would make pipelines much simpler to set up. Alternatively, every script could allow the `tool ` setup.

Additionally, all edited files could get the same suffix. E.g. every output could be suffixed with `.fix`, to make names such as `inter-regular.ttf.fix`. This would also simplify shell pipelines.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.