Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Freetype2 with GD Library (PHP Developement)

I am wanting to develop with the GD Library for PHP and use Freetype2. Do I need to have Developer Tools installed? Is it necessary to use my Snow Leopard machine, or is Leopard fine? I have both...

The only reason I ask, I seem to get some of the image functions to work, but when I try to access some of the Type Functions I get errors (imagefttext). I am thinking, maybe I got the GD Library installed correctly, but for some reason cannot get the Fonts installed correctly. In one of the links I read, they mention Developer Tools need to be installed for this to work.


This is the link I tried to follow. Second post. Working through Terminal, was getting errors. Not finding directories, and also, GNU does not recogize "make"...


http://forums.macrumors.com/showthread.php?t=381298


Any help would be greatly appreciated!

Mac mini, Mac OS X (10.6.8)

Posted on Oct 27, 2011 9:46 AM

Reply
6 replies

Oct 27, 2011 3:59 PM in response to BDAqua

Oops, sorry, that was the one I meant to type in that I was having the issue with (imagettftext)...


example #1 from that page was the one that I tried.


"Example #1 imagettftext() example"


I will try the others when I get in front of my machine later.

I have a GD/PHP book on the way from Amazon, but, off the top of your head, are there functions that allow one to draw text on a curved path? For instance, I believe, imagearc allows one to draw an arc or path from one point to the next, on a curve. Is there a function in PHP that would allow me to apply my text to that path?


thanks!

Oct 31, 2011 12:08 PM in response to dissasmblyline

I got everything loaded onto the mini with Snow Leopard (was only doing the Leopard version before). having the same problem...

I believe I got the Freetype2 installed correctly, will go into my PHP settings tonight and make sure is being pointed in the correct location (wondering if that is the problem). Imagestring worked fine, but the text is bland and was wanting to get some of the different fonts available to make what i am outputting look better (not sure if am able to use different fonts with Imagestring). also, you had mentioned the the ps functions... Would I have to install some type of font library for those functions as well?


essentially the error I am getting is a "Call to undefined function imageettftext" I have been searching around the web a bit, finding some stuff to try out.


When I call phpinfo(), do you know where I can check to make sure php is pointing in the direction of the Freetype2 I have installed?


thanks again!

Oct 31, 2011 1:00 PM in response to dissasmblyline

I'm thinking...


in "init.php" to see if FreeType2 is available.


As a first step to resolve this recompile Your PHP4 setup using the following basic configuration (depending on the local conditions some options/path might have to be changed). The critical options are marked in bold.

./configure --prefix=/usr/share \--datadir=/usr/share/php \--with-apxs=/usr/sbin/apxs \--libdir=/usr/share --includedir=/usr/include \--bindir=/usr/bin \--with-config-file-path=/etc \--enable-mbstring --enable-mbregex \--with-mysql \--with-gd \--enable-gd-imgstrttf \--enable-gd-native-ttf \--with-ttf-dir=/usr/lib \--with-freetype-dir=/usr/lib \--with-zlib-dir=/usr/lib \--with-png-dir=/usr/lib \--with-jpeg-dir=/usr/lib \--with-xpm-dir=/usr/X11R6 \--with-tiff-dir=/usr/lib \--enable-memory-limit --enable-safe-mode \--bindir=/usr/bin \--enable-bcmath -enable-calendar \--enable-ctype --with-ftp \--enable-magic-quotes \--enable-inline-optimization \--with-iconv

If there is still no TTF fonts displayed then the enxt step is to upgrade Your TTF libraries to the latest version. The FreeType version 2.1.9 is known to work well.


http://jpgraph.net/doc/faq.php


If you want to use the TrueType font support, you must also install theFreeType 2.x library, including the header files. See the Freetype Home Page, or SourceForge. No, I cannot explain why that site is down on a particular day, and no, I can't send you a copy.


http://www.boutell.com/gd/manual2.0.33.html

Freetype2 with GD Library (PHP Developement)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.