A short script I wrote that reads your locally installed fonts and then creates a PDF preview for all of them. Useful for deciding on fonts to use with your Dotfiles while ricing.
Requires Typst to compile the PDF natively and quickly. To install Typst on Arch Linux, run:
sudo pacman -S typst(For other distributions, check your package manager or the official Typst documentation)
-
Clone the repository or download the script.
-
If you need the PDF to showcase specific characters, you can modify the text variables. The lines to do this are commented in the script. Make sure to add a backslash in front of syntax characters. To configure the script, type
nano fontfile.sh
-
Make the script executable
chmod +x fontfile.sh
-
Execute the script:
./fontfile.sh
The script will automatically generate a fontfile.pdf in the same directory. It displays every installed font in standard, bold, italic, and bold-italic styles. It also includes various special characters to immediately show if a font lacks specific glyphs. To update the PDF after installing new font / deleting old ones, just execute it again. The script will detect the outdated file and create a new one automatically.
This project is licensed under the MIT License. Feel free to use and modify it!