renderer: use direct FreeType with explicit font files

This commit is contained in:
2026-08-13 20:40:38 +09:00
parent 125e9349c0
commit f46d51b539
16 changed files with 314 additions and 5201 deletions

View File

@@ -99,12 +99,25 @@ tab-separated data consumable by the runtime dictionary reader.
## Run and install
Start the daemon with the installed map and font directories:
Install one or more scalable outline fonts, then pass their files in fallback
order after the map directory. The daemon accepts at most four font files and
does not search the system font database. For example, the Docker-tested Arch
packages and paths are:
```sh
./strans map font &
doas pacman -S ttf-dejavu ttf-jigmo
./strans map \
/usr/share/fonts/TTF/DejaVuSans.ttf \
/usr/share/fonts/TTF/Jigmo.ttf \
/usr/share/fonts/TTF/Jigmo2.ttf &
```
These fonts are test fixtures, not runtime requirements. Any suitable
scalable outline files may be supplied; their argument order is the glyph
fallback order. A collection file uses its first face. If any named file is
absent or invalid, the popup disables itself cleanly while input processing
continues. `run.sh` and `bench.sh` accept the same font-file arguments.
The IPC socket is placed at `$XDG_RUNTIME_DIR/strans.sock` when
`XDG_RUNTIME_DIR` is an absolute path. Otherwise strans uses the per-user
fallback `/tmp/strans.<uid>`. A second daemon will not replace a live
@@ -153,7 +166,7 @@ and disconnect affect the engine only when they come from its active owner;
stale events cannot clear a newer owner's preedit.
The popup is an optional X window, including when the active frontend is
Wayland. It uses deterministic font fallback and fixed-width rune cells;
Wayland. It uses the explicit font-file order and fixed-width rune cells;
U+FE0E and U+FE0F variation selectors use zero cells. It does not perform
OpenType shaping, color-emoji rendering, or general grapheme clustering, and
there is no native Wayland popup renderer. Multi-rune emoji are committed