mirror of
https://github.com/nicoverbruggen/kobo-font-fix.git
synced 2026-03-23 08:40:08 +01:00
Update the README
This commit is contained in:
15
README.md
15
README.md
@@ -50,18 +50,23 @@ This is the naming convention used on Kobo devices for proper compatibility with
|
||||
You can then run:
|
||||
|
||||
```bash
|
||||
python3 kobofix.py ./src/*.ttf
|
||||
python3 kobofix.py --preset kf ./src/*.ttf
|
||||
```
|
||||
|
||||
By default, the script will:
|
||||
If no preset or flags are provided, the script will prompt you to choose a preset. See the [Presets](#presets) section below for details.
|
||||
|
||||
With the Kobo Fix (KF) preset, the script will:
|
||||
|
||||
1. **Validate all filenames.** If there are any invalid filenames, you will be prompted and can continue with all valid filenames, but it is recommended that you fix the invalid files.
|
||||
2. **Remove any WWS name metadata from the font.** This is done because the font is renamed afterwards.
|
||||
3. **Modify the internal name of the font.** Unless a new name was specified, this is merely a prefix that is applied. (By default, this is `KF`.)
|
||||
3. **Modify the internal name of the font.** The `KF` prefix is applied (replacing the `NV` prefix if present). A custom name can also be specified with `--name`.
|
||||
4. **PANOSE metadata is checked and fixed.** Sometimes, the PANOSE information does not match the font style. This is often an oversight but it causes issues on Kobo devices, so this fixes that.
|
||||
5. **Font weight metadata is updated.** There's other metadata that is part of the font that reflects the weight of the font. In case this information needs to be modified, it is adjusted.
|
||||
6. **Kern pairs from the GPOS table are copied to the legacy `kern` table.** This only applies to fonts that have a GPOS table, which is used for kerning in modern fonts.
|
||||
7. **The `font-line` helper is used to apply a 20% line-height setting.** This generates a new file which is immediately renamed to the desired output format.
|
||||
|
||||
Other presets and flags can change this behavior. For example, the NV preset applies 20% line spacing and skips kerning, and the `--hint` flag can be used to control hinting.
|
||||
|
||||
See [Customization](#customization) and [Presets](#presets) for details.
|
||||
|
||||
The modified fonts are saved in the directory where the original fonts are located.
|
||||
|
||||
@@ -74,7 +79,7 @@ You can customize what the script does. For more information, consult:
|
||||
```
|
||||
|
||||
Given the right arguments, you can:
|
||||
- Control kerning behavior (`--kern`): add a legacy kern table (default), remove GPOS after extraction, or skip entirely
|
||||
- Control kerning behavior (`--kern`): add a legacy kern table, remove GPOS after extraction, or skip entirely (default)
|
||||
- Control hinting (`--hint`): strip hints, apply ttfautohint to unhinted fonts, apply ttfautohint to all fonts, or skip (default)
|
||||
- Use a custom name for a font
|
||||
- Use a custom name for the prefix
|
||||
|
||||
Reference in New Issue
Block a user