| Crates.io | autobase |
| lib.rs | autobase |
| version | 0.1.0 |
| created_at | 2025-09-23 09:48:56.413997+00 |
| updated_at | 2025-09-23 09:48:56.413997+00 |
| description | Automatically generate BASE tables for OpenType fonts |
| homepage | |
| repository | https://github.com/simoncozens/autobase |
| max_upload_size | |
| id | 1851244 |
| size | 185,854 |
This is a utility for generating BASE tables for OpenType fonts.
It has two modes:
If the font contains CJK glyphs, it generates a BASE table as per the CJK Vertical Metrics requirements of Google Fonts.
Otherwise, it uses the fontheight library to analyze the highest and lowest coordinates of shaped strings in the various scripts supported by the font, and generates script specific MinMax tables to allow user agents to alter text vertical metrics based on the script in use.
autobase can be configured by passing a TOML configuration file to the -c argument. This TOML file can have the following keys:
languages is a list of script-language combinations to be split out of the main calculation and handled separately.overrides is a dictionary of min and/or max values to be manually set for a particular script-language combination.In both cases, script-language combinations are specified as yyy_Xxxx where yyy is a valid ISO639-1 or ISO639-3 language code and Xxxx is a valid ISO 15924 four-letter script code.
An example will make this clear. The following config file:
languages=["vi_Latn"]
[override]
fi_Latn = { max = 1234 }
with a font which supports Latin and Cyrillic will create:
Cyrl based on values measured when shaping the Cyrillic word lists.Latn based on shaping all Latin wordlists except Finnish and Vietnamese words.