PacoH has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to run a perl script, that was created in the Windows environment a while ago, on OS X Mountain Lion. I have installed the latest version of perl, perl-5.18.1, via perlbrew and installed the modules I needed, including PDF::API2, and GD. I installed libgd via homebrew. I am getting the error:
"libgd was not built with FreeType font support"I don't understand this because it looks as if libgd WAS built with FreeType font support:
'brew info libgd' gd: stable 2.1.0, HEAD http://libgd.bitbucket.org/ /usr/local/Cellar/gd/2.1.0 (33 files, 1.7M) * Built from source with: --with-freetype, --with-libvpx, --with-libti +ff From: https://github.com/mxcl/homebrew/commits/master/Library/Formula/ +gd.rb ==> Dependencies Recommended: libpng, jpeg Optional: freetype, libtiff, libvpx
My code includes the path to the system fonts.
my $fontdir = '/Library/Fonts/'; my $typeface = 'Arial.ttf';
This is the line that the error is referring to:
$gd_text->set_font("$fontdir$typeface", $fsize) or die $gd_text->error;This worked perfectly on Windows. All I did was change the path for OS X. Are TrueType fonts considered to be FreeType fonts?
This is what I've got in my .bash_profile:
export PATH=/usr/local/bin:$PATH export PATH=$PATH:$HOME/bin export PS1='\w : \u$ ' source ~/perl5/perlbrew/etc/bashrc export PERLBREW_ROOT=/opt/perl5 source ${PERLBREW_ROOT}/etc/bashrc
Did I leave anything out?
My path:
/Users/user/perl5/perlbrew/bin:/Users/user/perl5/perlbrew/perls/perl-5.18.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/ImageMagick/bin:/Users/user/binHow to solve this problem?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: GD giving me the error "libgd was not built with FreeType font support"
by Anonymous Monk on Dec 18, 2013 at 00:51 UTC | |
by PacoH (Initiate) on Dec 18, 2013 at 04:42 UTC | |
by PacoH (Initiate) on Dec 18, 2013 at 05:41 UTC | |
by taint (Chaplain) on Dec 18, 2013 at 07:39 UTC | |
|
Re: GD giving me the error "libgd was not built with FreeType font support"
by zentara (Cardinal) on Dec 18, 2013 at 17:20 UTC | |
by PacoH (Initiate) on Dec 18, 2013 at 19:48 UTC |