开发者

How to create font preview image from font file on Linux?

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 fon开发者_如何转开发t 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?


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜