I have a huge font collection and would like to be able to view them in an efficient manner rather than opening a file one by one.
What would be the best font viewer aside from fontypython, which unfortunately
has a Mojibake bug on fonts with multibyte characters.
10 Answers
I use Font Manager
sudo apt-get install font-manager 2 I use character maps heavily and decided to make one which you access from anywhere using a web interface and requires no installation.
Features
- Select your own font file
- Provides font and character information
- Character copy-able
- Supports TTF/OTF
- Supports Icon fonts
- Smooth interface
- No installation necessary
- No server upload necessary
Screenshot
Web browsers are good at this. Sample script whose output can be saved as a simple HTML page and viewed in a local browser:
#! /usr/bin/env bash
cat << __HEADER
<!DOCTYPE html>
<html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Sample of local fonts matching '$1'</title>
</head>
<body>
__HEADER
fc-list --format='%{family}\n' $1 | sort -u | while IFS='' read -r fontfamily
do cat << __BODY <hr/> <div> <h1>${fontfamily}</h1> <p> The quick brown fox jumped over the lazy brown dog<br/> 0123456789,.:;?/<>'"[]{}|\-=\`~!@#$%^&*()-=\\ </p> </div>
__BODY
done
cat << __FOOTER <hr/>
</body>
</html>
__FOOTERThe script takes an optional first argument, the fc-list pattern to filter on. For example passing :spacing=100 as the argument generates an HTML page of all installed monospace fonts, or pass nothing and see all fonts.
There's always Fontmatrix (Github). It has a slightly different feature-set to fontypython but I like it.
To install it from the repos, run:
sudo apt install fontmatrix 1 Your should also give a try to gnome-specimen (also available in Debian)
1Regular Ubuntu (and variants) repositories include (at least with current LTS release 20.04) programs font-viewer and gnome-font-viewers.
Both can be installed using regular package tools, including apt install as root, and called from your file manager through usual mechanisms, to preview font files from any directory.
They can also be called from command-line:
/usr/libexec/font-manager/font-viewer /path/to/font/file.ttf
gnome-font-viewer /path/to/font/file.ttfIncidentally, I happen to have encountered some fonts (partial encoding of a subset of a character set, extracted from a PDF file) that display well in font-viewer and show all characters substituted in gnome-font-viewer (and same for the PDF file in most PDF viewers).
Only simple adding to nharward script ⇑, to generate final html page. Thank you nharward.
Save this text in a file named "fontpreview.sh":
#!/usr/bin/env bash
cat > fonts.html << __HEADER
<!DOCTYPE html>
<html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Sample of local fonts matching '$1'</title>
</head>
<body>
__HEADER
fc-list --format='%{family}\n' $1 | sort -u | while IFS='' read -r fontfamily
do cat >> fonts.html << __BODY <hr/> <div> <h1>${fontfamily}</h1> <p> The quick brown fox jumped over the lazy brown dog<br/> 0123456789,.:;?/<>'"[]{}|\-=\`~!@#$%^&*()-=\\ </p> </div>
__BODY
done
cat >> fonts.html << __FOOTER <hr/>
</body>
</html>
__FOOTER
echo "fonts.html created"Then run in the command-line:
bash fontpreview.shThis will create a file called fonts.html which you can open in a browser.
I`ve created simple SVG font viewer
If you use Ubuntu (or likewise OS), you can use the Ubuntu in-built files viewer, you just have to change the view (click the view icon just to the right of the search magnifying glass until you see the fonts). To confirm further, you can just double click a font and see a quick overview. This is great if you want to quickly weed out various odd-char fonts for example.
Screenshot: showing 1) the output of the directory view, 2) the button to click to change to the right view, 3) An example of a clicked font
I know that the question is very stale, but one option is using YAD, a dialog maker. You can install it by:
sudo apt install yadAnd then use yad --font to show the fonts. It works because YAD has a font selector dialog.