Page 1 of 1

convert: FreeTypeLibraryIsNotAvailable [solved]

Posted: 2007-03-28T13:33:58-07:00
by jaano
Hi all
I tried to play around with exotic fonts, but I'm encountering huge problems, see topic. That happens, whenever I try to use a non standard font, let's say eg. "Sheer Beauty Regular" which I found here:
http://www.webpagepublicity.com/free-fonts.html

I use ImageMagick 6.3.3
First to my installed packages (ubuntu efty edge):

Code: Select all

libttf2
msttcorefonts
ttfbitstream-vera
ttf-devanagari-fonts
ttf-freefont
ttf-gentium
ttf-xfree86-nonfree
x-ttcidfont-conf

freetype1-tools
libfreetype6
libfreetype6-dev
libttf-dev
libttf2
libxft1
libxft2
I used the script from http://www.imagemagick.org/Usage/ to generate a type.xml inside ~.magick which let all the fonts appear when I type:

Code: Select all

convert -list type
but first of all the Sheer Beauty Font is not in it, but surprisingly any old fonts inside folders nearby. So I tried calling them all via the name in the type list and/or with

Code: Select all

 convert .. -font /folder/to/file.ttf ...
but I always got the same error:

Code: Select all

convert: FreeTypeLibraryIsNotAvailable `/folder/to/file.ttf'.
convert: FreeTypeLibraryIsNotAvailable `/folder/to/file.ttf'.
This is weird because the freetype library does exist, and I installed the fonts too using

Code: Select all

apt-get install kcontrol
kfontview -> install ... font.ttf
What is still wrong here?
Thank you for your appreciation

Best regards
Patrick

Re: convert: FreeTypeLibraryIsNotAvailable

Posted: 2007-03-28T16:26:34-07:00
by anthony
Two points. The imagick_type_gen script uses the 'locate' command to find all the file files. This will not find a font that was just installed until either you or the system does a 'updatedb' to update the 'locate' dat.

Second you need to have the FreeType library installed if IM is going to be able to handle TTF fonts. If it does exist as you say, then you need to make sure IM can find it. It should be somewhere on your LD_LIBRARY_PATH, or in the /usr/lib system directory.

For example...

Code: Select all

>=- locate libfreetype
/usr/lib/libfreetype.so
/usr/lib/libfreetype.so.6
/usr/lib/libfreetype.so.6.3.10
/usr/lib/xorg/modules/fonts/libfreetype.so
so the library is in the system directory on my system.

Re: convert: FreeTypeLibraryIsNotAvailable

Posted: 2007-03-29T04:52:58-07:00
by jaano
hi anthony, thank you very much!
You are totally right, I didn't do an updatedb afterwards. Totally forgot about that. It would be nice if you noted that on your ImageMagick Example page, too, so other people will find their way more easily. After hearing you telling me that, I find it perfectly clear, but I could imagine, that many people don't in the first moment (of have a terrible memory like I do).

Best regards

Patrick

Re: convert: FreeTypeLibraryIsNotAvailable

Posted: 2007-03-29T12:55:24-07:00
by jaano
OMG
I just reinstalled imagemagick and it works now!
How strange is that :(

about your two points: both were settled back then, I really don't know, what went wrong.
Well still my $LD_LIBRARY_PATH variable is empty but I can use freetype fonts now and that's great :)

Re: convert: FreeTypeLibraryIsNotAvailable

Posted: 2007-03-29T20:00:56-07:00
by anthony
[quote="jaano"]
You are totally right, I didn't do an updatedb afterwards. Totally forgot about that. It would be nice if you noted that on your ImageMagick Example page, too, so other people will find their way more easily. After hearing you telling me that, I find it perfectly clear, but I could imagine, that many people don't in the first moment (of have a terrible memory like I do).
/quote]
Thanks, I have updated both the top level page, and in the script itself.

Note I will eventually have to move that font stuff to a sub-section of IM examples, whcih is still growing, with pages spliting as they get too large. I will probably have to spilt 'Basics' (which already sub-divided into 'files' and 'formats') into General Image settings to talk about things like fonts, colors, geometries, meta-data, and other settings and controls.

As for your problem, glad to hear that it now works. Sometimaes it is better to built it yourself. Especially if you say want to use a local RSVG library for SVG file handling, rather that the IM builtin handling (whcih is in-complete). Or prehaps the new JPEG2000 format with its alpha channel and non-lossy compression additions.