Page 1 of 1

How can I use system font for annotation

Posted: 2013-05-18T09:18:07-07:00
by bombona
Hi,

I use ImageMagick 6.7.9-8 2012-09-22 Q16 on Windows XP.
I wanted to annotate some images and use system font, like "Segoe UI", so command looks like:

Code: Select all

convert -background "#00000080" -fill white -font "Segoe UI" -pointsize 12 label:...
but it doesn't work as IM can't find the font.

Searching the net I was under impression that I need to make Fontmap file for Ghostscript and use GS_LIB environment variable to make the magic work:

I created "C:\Program Files\gs\gs9.07\lib\Fontmap" file with this content:

Code: Select all

/Segoe UI	(SEGOEUI.TTF);
and set GS_LIB to "C:\Windows\Fonts". However IM still can't find the font. ("C:\Program Files\gs\gs9.07\lib" is in my PATH variable FYI)

Any ideas?

Re: How can I use system font for annotation

Posted: 2013-05-18T10:09:58-07:00
by fmw42
you either need to provide the full path to the font or run Anthony's script http://www.imagemagick.org/Usage/script ... k_type_gen to create a type.xml file for your fonts.

Re: How can I use system font for annotation

Posted: 2013-05-18T11:55:22-07:00
by bombona
Thanks for your fast reply :)

Full path works fine. That was enough

I tried also the Perl script under MinGW. Filepaths in XML dump were incorrect because of the way paths work under MinGW, i.e. "/c/windows/fonts" instead "c:/windows/fonts", but for some reason it also didn't detect my Segoe UI font, but just Segoe UI Light and Semibold, and extracted font names were not as they appear in common font dialogs... However as I have the structure of this XML file and explanation how to use it, I just re-created it with the help of 3rd part package.


Cheers