docs: Enhance fonttools installation instructions and error messages to differentiate between pip and pipx usage.

This commit is contained in:
2026-03-02 14:18:08 +01:00
parent 5853a58093
commit cc5e5359e5
2 changed files with 10 additions and 2 deletions

View File

@@ -18,11 +18,18 @@ Ensure the following tools and libraries are installed and accessible in your sy
2. **MKVToolNix** (specifically `mkvmerge` and `mkvextract`)
3. **fonttools** (Python library)
Install the required Python dependency via pip:
Install the required Python dependency:
For Windows or Ubuntu, you can use `pip`:
```bash
pip install fonttools
```
For ArchLinux (or if your system enforces PEP 668), it is recommended to use `pipx`:
```bash
pipx install fonttools
```
## Usage
Simply place the script inside the directory containing the `.mkv` files you wish to process and run it. You can also place the script in your personal `bin` or `PATH` folder to run it from anywhere.

View File

@@ -13,7 +13,8 @@ try:
from fontTools.ttLib import TTFont
except ImportError:
print("Error: 'fonttools' is required to accurately read internal font names.")
print("Please install it by running: pip install fonttools")
print("Please install it by running: pip install fonttools (for Windows/Ubuntu)")
print("Or: pipx install fonttools (for ArchLinux)")
sys.exit(1)
def get_ass_font_names(ass_path):