What's needed for fonts to be seen

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
daneyul
Posts: 7
Joined: 2003-08-27T15:37:02-07:00

What's needed for fonts to be seen

Post by daneyul »

When compiling IM, what are the most basic requirements to use the Ghostscript supplied fonts? Is Freetype necessary? Is gslib necessary? Does this change if building a portable IM (with no files external to my install dir?) I'm clueless on font side of things.


Trying to compile a stand-alone (portable) build (on OSX no less) which works fine up until text comes into play. ( "convert -l font" returns nothing)
I have a type.xml pointing to my ghostscript type xml, all seems to be in order there, but...no fonts. I've put type.xml in all the likely places but its as if it's not seen at all. gslib is NOT setup (seems to want to be a framework on osx, and having trouble doing a portable build using one). I'm wondering if not having gslib is causing an issue with it accepting the fonts, or if somehow I'm completely missing a path setting that points to type.xml. I have tried setting GS_FONTPATH to point to the fonts, to no avail.

Any suggestions would be most welcome at this point--turning into a very long build...
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: What's needed for fonts to be seen

Post by anthony »

A lot of people use TTF or OTF fonts. IM uses FreeType for font handling these fonts.

You can fill out your type.xml file using the imagick_type_gen script
http://www.imagemagick.org/Usage/script ... k_type_gen

See
http://www.imagemagick.org/Usage/#font
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
daneyul
Posts: 7
Joined: 2003-08-27T15:37:02-07:00

Re: What's needed for fonts to be seen

Post by daneyul »

I appreciate the reply!

Hmm..I was wanting to redistribute the fonts (which if license is included my understanding is I can with the 35 or so "free" gs ones). But...I certainly -could- also not redistribute fonts at all, and have IM pick up the OSX system fonts on a given system using that pearl script. Sounds like that would allow me to take gs out of the equation.

I just ran it, and got a nice type.xml filled with my system fonts. Problem is, though, convert -list font still returns nothing.

Freetype seems to be properly built. (I'm putting my delegate configure status below. It's still not getting gslib, but...that shouldn't be needed just to see the fonts, right?)

I have put the type.xml file in the same folder as the convert binary, in my im folder (what I used as $prefix in the build), in the config sub-folder of that folder, the etc sub-folder. Even created a "magick" dir off my home folder and put it there (which, as a portable build I really would hope not to need). Still....."convert -list font" returns nothing.

It seems to be looking for that type.xml file somewhere I'm not hitting. Is there a way to find out where that specific file should be in order for convert to see it? Or am I missing some key component here to even allow seeing fonts? Is "fontconfig" something needed for this?

Thanks!

-Daniel



Delegate Configuration:
BZLIB --with-bzlib=yes yes
Autotrace --with-autotrace=no no
Dejavu fonts --with-dejavu-font-dir=default none
DJVU --with-djvu=yes no
DPS --with-dps=yes no
FFTW --with-fftw=yes no
FlashPIX --with-fpx=yes no
FontConfig --with-fontconfig=no no
FreeType --with-freetype=yes yes
GhostPCL None pcl6 (unknown)
GhostXPS None gxps (unknown)
Ghostscript None gs (8.70)
Ghostscript fonts --with-gs-font-dir=/users/danielb/desktop/im/ImageMagick-6.6.9-4/fonts /users/danielb/desktop/im/ImageMagick-6.6.9-4/fonts/
Ghostscript lib --with-gslib=yes no
Graphviz --with-gvc=yes no
JBIG --with-jbig=yes no
JPEG v1 --with-jpeg=yes yes
JPEG-2000 --with-jp2=yes no
LCMS v1 --with-lcms=yes yes
LCMS v2 --with-lcms2=yes no
LQR --with-lqr=yes no
LZMA --with-lzma=yes no
Magick++ --with-magick-plus-plus=no no
OpenEXR --with-openexr=yes no
PERL --with-perl=no no
PNG --with-png=yes yes
RSVG --with-rsvg=no no
TIFF --with-tiff=yes yes
WEBP --with-webp=yes no
Windows fonts --with-windows-font-dir= none
WMF --with-wmf=no no
X11 --with-x=no no
XML --with-xml=no no
ZLIB --with-zlib=yes yes
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: What's needed for fonts to be seen

Post by anthony »

The same script will also handle the generation of the type.xml files for ghostscript fonts too.

However normally that is controlled by a include file "type-ghostscript.xml" that is the file that should be configured with the paths to ghostscript fonts.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
daneyul
Posts: 7
Joined: 2003-08-27T15:37:02-07:00

Re: What's needed for fonts to be seen

Post by daneyul »

Yep, I do have that type-ghostscript.xml, with the fonts listed within. And with-gs-font-dir pointed to it. Still...nothing when I type convert -list font

I'm dying here. What is needed for convert to see the fonts, either ghostscript (via type-ghostscript.xml, or the system fonts (which are included in my type.xml file)? Those files are in place, but no matter what I do, where I put them, convert -list font acts like there's nothing. What can I be missing?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: What's needed for fonts to be seen

Post by anthony »

But do the paths in the type-ghostscript.xml file actually point to real fonts???
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply