Corretto Subsetter
Produce alternate versions of your variable or static fonts.
Limit character sets, layout features, and variation axes.
- Generate trial fonts always in sync with your full fonts.
- From a master file with weight and width axes, export a separate variable font for each width with a weight axis.
- Generate smaller webfonts which only contain one writing system, with other writing systems as fallback fonts.
- Split a variable font with an italic axis into separate upright and italic variable fonts.
Save a copy of the font with subsetted character set, and, for variable fonts, limited axis ranges. The family name can be replaced or suffixed in the process. The subsetting is controlled via an external YAML file, the path to which is read from the custom parameter.
Get Corretto Subsetter
Corretto Subsetter is a commercial plugin. It will run as a fully functional evaluation version for 10 days after the first start.
Install Corretto Subsetter via GitHub.
Buy a license through my Gumroad Shop.
Configuration
Parameter
de.kutilek.corretto.subset
Format
relative_file_path
The path to the YAML file, relative to the Glyphs file.
Example
{
customParameters = (
{
name = de.kutilek.corretto.subset;
value = MyFont.correttosubsetter.yaml;
}
);
}
Explanation: Save additional versions of the exported font(s) as specified in the configuration file MyFont.correttosubsetter.yaml, which is located next to the Glyphs file. Example file structure:
─┬─ MyProject
├─ source
│ ├─ MyFont.glyphs
│ └─ MyFont.correttosubsetter.yaml
└─ ttf
├─ MyFont.ttf
└─ MyFontAdditionalVersion.ttf
YAML File Schema
A YAML schema file, Corretto.schema.yaml, is included inside the plugin. Configure your text editor, e.g. VSCode, to use it for files matching *.correttosubsetter.yaml to get live syntax checking and autocompletion.
How to use the YAML file is easier to demonstrate by using examples than by looking at the YAML schema, or keep reading for a more detailed explanation.
Description of the YAML format
charsets
Defines character sets as lists of codepoints which can be used to limit the font’s character set.
Each character set will be referenced by its id value further down the file. The id must be unique. The unicodes key contains a list of codepoints in hexadecimal string notation. You can prepare such list by selecting glyphs in Glyphs and Copy Glyph Names – Unicodes via the contextual menu in the Font View.
Example:
charsets:
- id: demo
unicodes:
- "000D"
- "0020"
- "0021"
- "0022"
# - etc. ...
featuresets
Defines sets of OpenType layout features that should be kept in the font.
Each feature set will be referenced by its id value further down the file. The id must be unique.
The base key defines what the starting set of layout features will be:
all: All layout features that are present in the fontdefault: All layout features that are on by default (as defined by fontTools.subset)none: No layout features
Those initial sets can be modified by adding or subtracting features via their tags.
Example: Keep only features that are active by default, keep stylistic set 1 in addition to that, but remove the default mark positioning and mark to mark positioning features.
featuresets:
- id: default
features:
base: default
add:
- ss01
remove:
- mark
- mkmk
Further examples:
featuresets:
# Keep only on-by-default layout features
- id: default
features:
base: default
# Keep only the mark positioning layout feature
- id: minimal
features:
base: none
add:
- mark
# Keep all but the 'aalt' and 'salt' layout features
- id: no-alts
features:
base: all
remove:
- aalt
- salt
ranges
Defines sets of variation axes that can be limited to a smaller range than originally present, or drop axes completely while specifying the remaining design location on the dropped axes.
Example: For a font with weight, italic, and descender axes, keep the italic axis as is, limit the weight axis from Regular to Bold, and fix the descender axis to -188.
ranges:
- id: ribbi
axes:
- tag: ital # Not touched
- tag: wght # Limited
min: 400
def: 400
max: 700
- tag: YTDE # Will be dropped and set to fixed value -188
def: -188.0
subsets
Defines the subsets to generate by combining the previously defined parameters.
Example: Combine the ribbi range with the demo character set and the minimal feature set, add a “Trial” suffix to the font family name, and save a copy of the original fonts in the directory MyFamily Trial Fonts.
subsets:
- range: ribbi
charset: demo
family:
suffix: Trial # Add "Trial" to the existing family name
featureset: minimal
out_dir: MyFamily Trial Fonts
Example: Combine the ribbi range with a win-1252 character set (definition not shown here), keep all layout features, replace the font family name by “MyFamily Basic”, and save a copy of the original fonts in the directory MyFamily Basic.
subsets:
- range: ribbi
charset: win-1252
family:
replace: MyFamily Basic # Set the family name to "MyFamily Basic"
out_dir: MyFamily Basic
Version History
See the Change Log on GitHub.