Page 1 of 2
php-devel
Posted: Wed Jan 17, 2007 12:57 pm
by tobeyt23
How can i install t1lib with php-devel or do i need to do something else
Posted: Wed Jan 17, 2007 1:35 pm
by volka
linux? distribution?
Posted: Wed Jan 17, 2007 1:41 pm
by tobeyt23
Fedora Core 4, PHP 5.0.4
Posted: Wed Jan 17, 2007 1:44 pm
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
Posted: Wed Jan 17, 2007 1:48 pm
by tobeyt23
then how do i configure ... kinda getting confused on how to do this tried what I could find online and nothing happens?
Posted: Wed Jan 17, 2007 2:16 pm
by volka
configure what?
Posted: Wed Jan 17, 2007 2:17 pm
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.
Posted: Wed Jan 17, 2007 2:42 pm
by volka
php works fine without t1lib.
Do you want to use the gd extension with postscript fonts support?
Posted: Wed Jan 17, 2007 2:46 pm
by tobeyt23
I need to use imagepstext so i can use the tightness to control the spacing between letters.
Posted: Wed Jan 17, 2007 2:49 pm
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?
Posted: Wed Jan 17, 2007 2:51 pm
by tobeyt23
yes that will work but you can not to tightness with the I do not believe?
Posted: Wed Jan 17, 2007 2:52 pm
by volka
Sorry, I do not understand the last sentence.
Posted: Wed Jan 17, 2007 2:58 pm
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?
Posted: Wed Jan 17, 2007 5:39 pm
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
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.
Posted: Thu Jan 18, 2007 10:53 am
by tobeyt23
Thank you very much that did the trick.