A cache-based command-line tool for fast finding of font files.
With fontgrepc, you can add folders containing font files to a cache and then search within that cache.
fontgrepc is a Rust tool, and a sister project to fontgrep. fontgrep performs live filesystem searches, and is very fast for tens of thousands of fonts. fontgrepc uses a simple SQLite cache, and can be slightly faster when searching within hundreds of thousands of fonts.
cargo install fontgrepcor
cargo install --git https://github.com/twardoch/fontgrepcBefore searching, you must add your fonts to the cache:
# Add fonts from a directory
fontgrepc add /folder/with/fonts
# Add fonts with verbose output (shows cache path)
fontgrepc add -v /folder/with/fonts
# Force re-adding of fonts
fontgrepc add --force /folder/with/fonts
# Specify a custom cache location
fontgrepc add --cache-path /path/to/cache.db /folder/with/fontsOnce added to the cache, you can search for fonts using various criteria:
# Find variable fonts
fontgrepc find --variable
# Find fonts with specific features
fontgrepc find -f smcp,onum
# Find fonts supporting specific scripts
fontgrepc find -s latn,cyrl
# Find fonts by name pattern
fontgrepc find -n "Roboto.*Mono"
# Find fonts supporting specific Unicode ranges
fontgrepc find -u "U+0041-U+005A,U+0061-U+007A"
# Find fonts with specific tables
fontgrepc find -T GPOS,GSUB
# Combine multiple criteria
fontgrepc find -f smcp -s latn --variable# List all fonts in the cache
fontgrepc list
# List all fonts with verbose output (shows cache path)
fontgrepc list -v
# Remove missing fonts from the cache
fontgrepc clean
# Clean with verbose output (shows cache path)
fontgrepc clean -v# Output in JSON format
fontgrepc find -j --variable
# Output in JSON format (alternative)
fontgrepc --json find --variable- Cache Location: Use
--cache-pathto specify a custom cache location (defaults to user's data directory). - Parallel Jobs: Use
-j/--jobsto control the number of parallel jobs for adding fonts (defaults to CPU core count). - Verbose Output: Use
-v/--verbosefor detailed logging and to display the cache path.
git clone https://github.com/twardoch/fontgrepc.git
cd fontgrepc
cargo build --releasecargo fmt --all && cargo clippy --all-targets --all-features -- -D warningscargo testThis project is:
- licensed under the MIT License, or
- dedicated to the public domain per CC0,
at your option.
- Based on fontgrep by Simon Cozens
- Uses skrifa for font parsing
- Uses rusqlite for SQLite database access
- Uses rayon for parallel processing
- Uses lazy_static for efficient connection pooling