1

The awesome display command from imagemagick allows me to preview fonts:

display ~/.fonts/font.ttf

However, the text is always the same ('That which does not destroy me, only makes me stronger'). Is there a way to change the standard text?

3 Answers3

1

There is a script for ImageMagick tools to show fonts with several bells & whistles http://www.imagemagick.org/Usage/scripts/show_fonts.

0

(summary from the script listed in the other answer)

Use the command:

convert -font /path/to/file.ttf -pointsize 200 label:"text" out.png && display out.png

text is the text to be displayed. 200 is the font size used in the example.

For some reason, display (or magick display) doesn't recognize the -pointsize option (while convert does), so I have to store it to a temporary file then display it. (out.png in this example, but can be anything)

Unfortunately, this method doesn't allow you to easily show the font at different sizes like the preview.

Alternatively use display directly:

display -density 400 -font file.ttf label:"text"
0

You would have to alter the source code (more specifically the TTF coder, line 276) and recompile IM if you want to have a different text sample in font preview.

don_crissti
  • 82,805