Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fonts

Image

Version Rust License Platform Stay Amazing

A TUI font picker with live previews. Browse every font installed on your system, see the highlighted family rendered in its own typeface, and get the chosen family + point size back. Built to be launched as a picker by another TUI, exactly like prism is for colours. Part of the Fe2O3 Rust terminal suite.


How it works

fonts shells out to glyph (the rasterizer): glyph --list enumerates every .ttf/.otf under /usr/share/fonts, ~/.fonts, and ~/.local/share/fonts in one fast pass, and glyph --preview FONT SIZE TEXT renders the preview that glow draws inline (kitty / sixel). So the picker is a thin, fast TUI; the heavy lifting is in glyph.

Usage

fonts                 # browse; prints the picked font on Enter
fonts --out=FILE      # write the result to FILE (for scribe/grid/…)
fonts --size 14       # start at 14 pt
fonts "DejaVu Serif"  # preselect a family

On Enter it emits (to --out FILE or stdout):

family=DejaVu Serif
size=14
path=/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf

On Esc it writes nothing and exits non-zero, so a caller can tell a pick from a cancel.

Keys

Key Action
/ PgUp PgDn move through the list
Shift+↑ Shift+↓ change the point size
type / Backspace filter by family name
Ctrl-U clear the filter
Enter pick
Q / Esc / Ctrl-C quit

As a picker (the prism pattern)

Another TUI launches fonts --out=FILE, restores its own screen, then reads the family and size from FILE. For example, scribe binds \F to wrap a Visual selection in <span style="font-family:'…'; font-size:…pt">, which survives a Markdown / HTML save and exports to docx / odt / pdf with the font intact.

Install

# From a release (Linux/macOS, x86_64/aarch64)
chmod +x fonts-* && mkdir -p ~/bin && mv fonts-linux-x86_64 ~/bin/fonts

# Or build from source (needs the sibling crust/glow crates alongside)
for r in crust glow fonts; do git clone https://github.com/isene/$r; done
cd fonts && cargo build --release

Requires glyph on PATH.

License

Public domain (Unlicense).

About

TUI font picker with live previews (glyph + glow). Returns family + size; launchable as a picker like prism. Part of Fe2O3.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages