php-devel

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

tobeyt23
Forum Newbie
Posts: 8
Joined: Wed Jan 17, 2007 12:54 pm

php-devel

Post by tobeyt23 »

How can i install t1lib with php-devel or do i need to do something else
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

linux? distribution?
tobeyt23
Forum Newbie
Posts: 8
Joined: Wed Jan 17, 2007 12:54 pm

Post by tobeyt23 »

Fedora Core 4, PHP 5.0.4
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

According to http://fedoraproject.org/extras/4/i386/ ... group.html
# t1lib-5.1.0-4.fc4: PostScript Type 1 font rasterizer
# t1lib-devel-5.1.0-4.fc4: Header files and static libraries for t1lib
are available from the fedora extras repository
tobeyt23
Forum Newbie
Posts: 8
Joined: Wed Jan 17, 2007 12:54 pm

Post by tobeyt23 »

then how do i configure ... kinda getting confused on how to do this tried what I could find online and nothing happens?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

configure what?
tobeyt23
Forum Newbie
Posts: 8
Joined: Wed Jan 17, 2007 12:54 pm

Post by tobeyt23 »

i need to configure this to work with php and don't know how to do this, this is what I want to do.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

php works fine without t1lib.
Do you want to use the gd extension with postscript fonts support?
tobeyt23
Forum Newbie
Posts: 8
Joined: Wed Jan 17, 2007 12:54 pm

Post by tobeyt23 »

I need to use imagepstext so i can use the tightness to control the spacing between letters.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

tobeyt23 wrote:I need to use imagepstext so i can use the tightness to control the spacing between letters.
The the answer is yes.

Did you install the package php-gd (e.g. via yum) and it came without support for truetype fonts?
Do you use the fedora package for php (again via yum) or did you install something else or built it from sources?
Last edited by volka on Wed Jan 17, 2007 2:51 pm, edited 1 time in total.
tobeyt23
Forum Newbie
Posts: 8
Joined: Wed Jan 17, 2007 12:54 pm

Post by tobeyt23 »

yes that will work but you can not to tightness with the I do not believe?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Sorry, I do not understand the last sentence.
tobeyt23
Forum Newbie
Posts: 8
Joined: Wed Jan 17, 2007 12:54 pm

Post by tobeyt23 »

I can use imagettftext however i can not control the spacing between letters like is says imagepstext can do. Thus this is why I need to install t1lib or do you know how to get letter spacing to work with imagettftext?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Installing t1lib alone will not solve the problem. The gd extension has to be compiled with t1lib support - that's nothing you can activate on runtime, either gd.so has t1lib support or it has not.
If you installed php-gd from the official fedora repo and it has no support for t1lib and you can't find another feasible package then you have to build it from sources yourself. I don't have fedora so I can only roughly talk you through it.

download http://download.fedora.redhat.com/pub/f ... .5.src.rpm
extract the files via rpm -ivh php-5.0.4-10.5.src.rpm
Now somewhere has to be a spec file for this source rpm, use find /usr/src -iname 'php*.spec' -print to locate it
open this file in a text editor
search for configure, something that looks like the configure script is called, might be
./configure \
--with-yadda-yadda
If a line ends with \ it means the next line belongs to the same command, therefore
./configure \
--with-yadda-yadda \
--with-foo \
--with-bar
is one command. Now look if this configure command already contains something about gd, e.g.
--with-gd
--with-ttf
--enable-gd-native-ttf
--enable-gd-jis-conv
if you find one of these options in the configure command add a new line

Code: Select all

--with-t1lib \
save the file
Make sure the t1lib is already installed (since the dependency was not added it's will not be installed automagically)
run rpmbuild -bb php.spec
This should build new rpms, including one for php-gd hopefully with t1lib support.
tobeyt23
Forum Newbie
Posts: 8
Joined: Wed Jan 17, 2007 12:54 pm

Post by tobeyt23 »

Thank you very much that did the trick.
Post Reply