How aishervin/termux-persian-font-injector works
Termux-Persian-Font-Injector combines a native terminal wrapper and font-injection workflow with a browser-based workbench. In the terminal path, text enters shen-tty, is shaped and reordered, then rendered through the selected output mode; installation also builds the wrapper and installs fonts. The web path provides a live Persian terminal preview, glyph exploration, and repository browsing/download. The README documents installer, font-switching, and fallback-rendering capabilities. Some subsystem links rely on README statements because installer and font-generation internals were not sampled.
Main entry points: shen_tty.c PTY wrapper · install.sh Installer · App.tsx Workbench interface · persian_shaper.h Persian shaping
Components 15
Terminal runtime
- PTY wrapper
repo/src/shen_tty.c - Persian shaping
repo/src/persian_shaper.h - Bitmap glyphs
repo/src/bitmap_font_8x16.h
Font assets
- Font generator
repo/scripts/generate_font.py - TTF font files
repo/assets
Web workbench
- Web app entry
src/main.tsx - Workbench interface
src/App.tsx - Preview shaping
src/lib/persianEngine.ts - Repository archive
src/lib/tarBuilder.ts
Installation
- Installer
install.sh
Other components
- Terminal user
- Terminal output
- Termux font slot
- Workbench user
- System shell
Connections 16
- Terminal user → PTY wrapper: runs
README.md - PTY wrapper → Persian shaping: shapes text
repo/src/shen_tty.c - PTY wrapper → Bitmap glyphs: uses glyphs
repo/src/shen_tty.c - Persian shaping → Terminal output: reorders text
repo/src/persian_shaper.h - PTY wrapper → Terminal output: renders modes
README.md - Font generator → TTF font files: generates fonts
README.md - Installer → PTY wrapper: builds wrapper
README.md - Installer → Termux font slot: injects font
README.md - TTF font files → Termux font slot: installs font
README.md - Terminal user → Installer: installs
README.md - Installer → System shell: adds commands
README.md - Workbench user → Web app entry: opens workbench
README.md - Web app entry → Workbench interface: renders
src/main.tsx - Workbench interface → Preview shaping: previews text
src/App.tsx - Workbench interface → Repository archive: browses and packs
src/App.tsx - Preview shaping → Bitmap glyphs: reads glyph data
src/lib/persianEngine.ts