feat: add --overlay-font-family option for caption font customization

Allow users to specify a custom font family for the overlay captions via
a new --overlay-font-family flag, defaulting to "Sans". Validation
ensures the font family is not empty. Updated README, config, and tests.
This commit is contained in:
2026-07-16 18:09:09 +03:00
parent 192666dd43
commit 2f5ca41ac3
4 changed files with 37 additions and 6 deletions
+3 -2
View File
@@ -105,6 +105,7 @@ Layer Shell and X11 hints are requests, not universal guarantees. Same-layer win
| `--overlay-backend=auto|wayland|x11` | `auto` | Let GTK detect the backend, or require one explicitly. |
| `--overlay-opacity=0.90` | `0.90` | Dark bubble opacity from `0` to `1`. |
| `--overlay-font-size=28` | `28` | Font size in logical pixels. |
| `--overlay-font-family=Sans` | `Sans` | GTK/Pango font family for final and provisional captions. |
| `--overlay-bottom-margin=100` | `100` | Bottom margin in logical pixels. |
| `--overlay-max-width=1200` | `1200` | Fixed caption-bubble width; it is capped at 80% of the selected monitor. |
| `--overlay-monitor=auto` | `auto` | `auto`, a zero-based monitor index, or a connector name such as `DP-1`. |
@@ -114,9 +115,9 @@ Layer Shell and X11 hints are requests, not universal guarantees. Same-layer win
Examples:
```bash
# Larger text, longer final-caption visibility
# Larger text, a custom font, and longer final-caption visibility
./scripts/distrobox/run.sh --mode=vad --output=overlay \
--overlay-font-size=34 --overlay-final-timeout=6s
--overlay-font-size=34 --overlay-font-family="Noto Sans" --overlay-final-timeout=6s
# Explicit XWayland/X11 route on the cursor's monitor
./scripts/distrobox/run.sh --mode=vad --output=both --overlay-backend=x11