Page 1 of 1

Create a graphical output of the fonts

Posted: 2015-03-22T02:39:02-07:00
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.

Re: Create a graphical output of the fonts

Posted: 2015-03-22T02:56:10-07:00
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.

Re: Create a graphical output of the fonts

Posted: 2015-03-22T04:05:06-07:00
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.

Re: Create a graphical output of the fonts

Posted: 2015-03-22T06:08:01-07:00
by myspacee
Ok, for fonts different than ttf?

Re: Create a graphical output of the fonts

Posted: 2015-03-22T06:50:11-07:00
by Bonzo
I can not remember what fonts IM supports but a quick Google search turned up this post

Re: Create a graphical output of the fonts

Posted: 2015-03-22T11:53:06-07:00
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.