Create a graphical output of the fonts

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Create a graphical output of the fonts

Post by myspacee »

Hello,
at job, we host internally more than 3000 fonts taken from differents typographies.
Typographies want to take only needed fonts from others, so server host fonts and users pick only needed.
All fine.

I want to create a graphical preview for given fonts folders, without install them on my Windows server.

Find nice PHP script here : http://www.rubblewebs.co.uk/imagemagick ... /fonts.php
But understand that it returns 'only' installed fonts. I've one directory for every typography
so i wanto to show, with an image, a preview for every fonts.

Anyone can help me with some hints?

thank you,
m.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Create a graphical output of the fonts

Post by snibgo »

I don't understand the question. IM can read ttf font files, even if they are not installed. For example:

Code: Select all

convert -size 500x200 xc: -gravity center -pointsize 50 -font "one-stroke-script.ttf" -annotate 0 "Hello world" hw.png
A script could find what font files are on your computer, and use a command like this to create a sample.
snibgo's IM pages: im.snibgo.com
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Create a graphical output of the fonts

Post by Bonzo »

You could use glob() to build an array of all the fonts in a folder and then loop over that using snibgo's command above replacing "one-stroke-script.ttf" with the font name.
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Re: Create a graphical output of the fonts

Post by myspacee »

Ok, for fonts different than ttf?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Create a graphical output of the fonts

Post by Bonzo »

I can not remember what fonts IM supports but a quick Google search turned up this post
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Re: Create a graphical output of the fonts

Post by myspacee »

Try in next days,
quick google search take me here : http://www.rubblewebs.co.uk/imagemagick ... /fonts.php
http://xpt.sourceforge.net/techdocs/med ... ent_font_1

any official faq/doc can reply this question?

Thank you,
M.
Post Reply