44

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.

11 Answers 11

46

I use Font Manager

sudo apt-get install font-manager

screenshot

2
39

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

Screenshot of CharMap interface

3
  • I wish I could do more than upvote this. This tool is wonderful. Thank you! Feb 15, 2020 at 20:39
  • Nice! I wish it showed also a sample piece of text using the font. But the glyph information is really nice! Oct 14, 2021 at 5:25
  • This is offline as of 2023-01-30
    – feeela
    Jan 30 at 10:51
10

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 style="font-family: '${fontfamily}', 'serif'">
        <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>
__FOOTER

The 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.

6

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

Screenshot

1
  • Just used it. It seems to have more features than fontypython, but is instead less immune to foreign multi-byte fonts. Nevertheless +1 for introducing the tool I didn't know. thx.
    – Gödel
    Oct 20, 2010 at 11:00
4

Your should also give a try to gnome-specimen (also available in Debian)

1
  • This seems to be a dead project, it hasn't been touched in 8 years.
    – Flimm
    Dec 4, 2020 at 17:10
2

Regular 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.ttf

Incidentally, 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).

1

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 style="font-family: '${fontfamily}', 'serif'">
        <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.sh

This will create a file called fonts.html which you can open in a browser.

0

I`ve created simple SVG font viewer

http://jsfiddle.net/iegik/r4ckgdc0/show/

0

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

Screenshot

0

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 yad

And then use yad --font to show the fonts. It works because YAD has a font selector dialog.

0

Follow-up to bluejamesbond answer. His tool is no longer online. I uploaded it to docker hub: https://hub.docker.com/r/icarrera/charactermap

docker run -p 5000:5000  icarrera/charactermap:85d2bf9

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .