Upload files to "font-tools"

This commit is contained in:
2025-09-27 18:39:09 +02:00
parent 106c4186ea
commit 4868d29df8
2 changed files with 249 additions and 0 deletions

63
font-tools/README.md Normal file
View File

@@ -0,0 +1,63 @@
# Font Tools
Collection of bash scripts for font processing and conversion.
## Scripts
### convert-ttf-in-woff2.sh
Script to convert TTF fonts to WOFF2 format
**Usage:**
```bash
./convert-ttf-in-woff2.sh file1.ttf file2.ttf ...
./convert-ttf-in-woff2.sh *.ttf
```
Or select files in Nemo file manager and run as script
**Parameters:**
- `files` - TTF files to convert
**Examples:**
```bash
./convert-ttf-in-woff2.sh font1.ttf font2.ttf # Convert specific files
./convert-ttf-in-woff2.sh *.ttf # Convert all TTF files
./convert-ttf-in-woff2.sh fonts/*.ttf # Convert TTF files in fonts folder
```
**Features:**
- Converted fonts will be saved in the 'woff2' subdirectory
- When used as Nemo script, progress is shown graphically
- Dual-mode operation (GUI/Terminal)
- Progress tracking and batch processing
- Automatic output directory creation
**Dependencies:**
- `woff2` package for font conversion
- `zenity` for GUI dialogs (usually pre-installed)
## Installation
1. Install dependencies:
```bash
sudo apt install woff2 # Ubuntu/Debian
sudo dnf install woff2-tools # Fedora
# Note: zenity is usually pre-installed with desktop environments
```
2. Make scripts executable:
```bash
chmod +x *.sh
```
3. For use as Nemo scripts, copy to:
```bash
~/.local/share/nemo/scripts/
```
## Notes
All scripts support dual-mode operation:
- **Terminal mode**: When run from command line
- **GUI mode**: When run as Nemo file manager scripts with zenity dialogs