fontpreview
is a commandline tool that lets you quickly search for fonts
that are installed on your machine and preview them. The fuzzy search feature
is provided by fzf
and the preview is generated with imagemagick
and then
displayed using sxiv
. This tool is highly customizable, almost all of the
variables in this tool can be changed using the commandline flags or you can
configure them using environment variables.
Dependencies
xdotool
fzf
imagemagick
sxiv
Installation
Install using make
# Clone the repo
$ git clone https://github.com/sdushantha/fontpreview
# Change your current directory to fontpreview
$ cd fontpreview
# Install it
$ sudo make install
Install it locally
# Download the fontpreview source code, save as fontpreview
# and make it executeable
$ curl -L https://git.io/raw_fontpreview > fontpreview && chmod +x fontpreview
# Then move fontpreview to somewhere in your $PATH
# Here is an example
$ mv fontpreview ~/scripts/
Usage
If you want to generate a preview image for a single font file
(.otf, .ttf, and .woff are supported), use the -i
and -o
option
to indicate the filename of the input font and the output preview
image.
$ fontpreview -i font.otf -o preview.png
This can be used with überzug to implement font preview within terminal file managers such as vifm.
https://github.com/sdushantha/fontpreview
Comments
Post a Comment
Your input is valued. Please type something....