1

I am wondering if there is any easy / possible way to create a "font preview image" file for a given font file on the Linux command line.

You know, like when you click on a font file in Linux or Windows file explorer and you get a little font preview window with "The quick brown fox jumps overs the lazy dog" in different sizes etc.

The input font file would be .PFB (Adobe type 1 font) or .TTF (TrueType font).

So, for example:

createfontpreviewimage somefont.pfb

[which creates somefontpreview.png or whatever]

Any thoughts? Or will I have to go down the hard work route of embedding the font file in a PDF document and generating the preview as a PDF document with PDFLib or some such?

iDev
  • 23,310
  • 7
  • 60
  • 85
Dougal
  • 55
  • 1
  • 5

2 Answers2

4

Use fontimage: http://fontforge.sourceforge.net/fontimage.html

0

Write simple PHP script and use imagettftext() function to generate your images

Artur Marnik
  • 116
  • 2