Add new fonts to pango (ghostscript)

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
myicq
Posts: 29
Joined: 2012-04-11T04:23:21-07:00
Authentication code: 8675308

Add new fonts to pango (ghostscript)

Post by myicq »

First a great thank you to developers of IM. After I installed last update, suddenly Pango worked on Windows. WOW.

For others, this is what I have:

Code: Select all

Version: ImageMagick 6.9.0-1 Q16 x86 2014-12-22 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates (built-in): bzlib cairo freetype jbig jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib

For some needs I would like to have other fonts than what's available by default in GhostScript (which seems to be needed to use Pango).

Do anyone have a step-by-step guide on how to add fonts to a working ImageMagick installation ? As example going from TTF font file to combination of AFM/PFB/PFM. The instructions here seem outdated and many links don't work : http://pages.cs.wisc.edu/~ghost/doc/AFPL/6.50/Fonts.htm

If I can somehow call a TTF file by command line that would be enough.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Add new fonts to pango (ghostscript)

Post by fmw42 »

I do not know if this will help and you may need fontconfig as a delegate. But see http://www.imagemagick.org/Usage/script ... k_type_gen. But this script is for unix, unfortunately.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Add new fonts to pango (ghostscript)

Post by dlemstra »

I added support for Pango a while back, December 2013 to be exact. But I am happy to hear you appreciate the work that has been done. First I would tell you to upgrade to a more recent version of IM. Version 6.9.0-1 is a faulty release, would you mind sharing where you downloaded that version?

I don't think Pango needs to use the Ghostscript fonts. I just did a quick check in the source of Pango and it seems it loads fonts from the default windows font folder (%windir%\fonts). I think you only need to put your ttf files there. Have you tried that?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
myicq
Posts: 29
Joined: 2012-04-11T04:23:21-07:00
Authentication code: 8675308

Re: Add new fonts to pango (ghostscript)

Post by myicq »

Maybe I am mistaken about Pango vs Ghostscript. But I did not find an option to call a custom font and use that.

Will make some more trials later.

About the version - I do not know where I got it from. Will upgrade soon then. Sorry I can't be of more help.
Post Reply