Hi.
On PHP 4.3.10 on Linux I try to:
------
$im = imagecreate(400 , 30);
$black = imagecoloralloc ate($im, 0, 0, 0);
imagettftext($i mage, 20, -3, 10, 20, $black, 'Arial.ttf', 'Test');
-------
But I get this error message:
--------
PHP Fatal error: Call to undefined function: imagettftext()
-----------
'Arial.ttf' is located in the same directory as my script. My phpinfo()
is:
--------------
'./configure' '--prefix=/usr/local/php'
'--with-apxs2=/usr/local/httpd/bin/apxs'
'--with-mysql=/usr/local/mysql' '--with-curl=/usr/local/include/curl'
'--with-gd=/usr/local/gd' '--with-zlib-dir=/usr/local/zlib'
'-with-jpeg-dir=/usr/local/jpeg-6b'
--------------
Any suggestion? Thx. 1 10478 fr***********@e urope.com wrote: On PHP 4.3.10 on Linux I try to: ------ $im = imagecreate(400 , 30); $black = imagecoloralloc ate($im, 0, 0, 0); imagettftext($i mage, 20, -3, 10, 20, $black, 'Arial.ttf', 'Test'); -------
But I get this error message: -------- PHP Fatal error: Call to undefined function: imagettftext() -----------
'Arial.ttf' is located in the same directory as my script. My phpinfo() is: -------------- './configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/httpd/bin/apxs' '--with-mysql=/usr/local/mysql' '--with-curl=/usr/local/include/curl' '--with-gd=/usr/local/gd' '--with-zlib-dir=/usr/local/zlib' '-with-jpeg-dir=/usr/local/jpeg-6b' --------------
Any suggestion? Thx.
You need to compile the freetype library into php to be able to use that
function.
--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: bof |
last post by:
I'm attempting to use ImageTTFText to render text to an image, I can get
it to work if I
a) specify the full font path
b) switch off anti-aliasing
c) specify an OpenType font (e.g. arial.ttf)
If I specify a TrueType font (e.g. futura.ttf) I get an error message
"Warning: imagettftext(): Could not find/open font in c:\filepath"
|
by: John Wellesz |
last post by:
Hi,
since I've upgraded to php 4.3.4 (before I used 4.1.2) I have a problem
with imagettftext():
when executing the line:
imagettftext($im, 20, 0, 10, 25, $white, "$script_dir/verdana.ttf", "Test
en cours... Oméga: Ω");
|
by: ljb |
last post by:
Using PHP-4.3.11 with GD extension, bundled GD library, and freetype-2.1.9
(with X.org 6.8.1). I can't get the TrueType Font (TTF) bounding box to
come out right. Whether using imagettftext() or imagettfbbox(), for some
angles of text (like 45 degrees), the box comes back in the wrong place.
Sample code below; just change the $font assignment...
|
by: Gordan |
last post by:
Im using imagettftext to write some text on my image. I'm on Win XP and using
the plain arial.ttf font that I copied from win dir
my typical line would be
imagettftext($im, 33, 0, 20, 500, $black, 'arial.ttf', $text);
everything is perfect except the tab "\t" sign
if I set $text = "something\tsomething" the tab gets displayed but it also...
|
by: Netocrat |
last post by:
Any comments on the correctness of the statements 1, 2a, 2b, 3 and 4 in
the code below?
If they are correct, then the definition of an object as well as that of
an lvalue is broken in C99 by the following reasoning:
foo() does not return an object, so the return of foo() conceptually is
not stored, yet we are able to obtain a pointer to...
| |
by: Felix Kater |
last post by:
Hi,
I can compile and run this code (see below) which twice calls the
function f, first with too less, second with too much arguments.
But is it legal and free of memory leaks and other problems? Of course,
I presume that inside f I don't access i in case it was called via g.
int f(int i){ /* ... */ return 0; }
|
by: Smita1617 |
last post by:
Hi All...
My development site is working on PHP5 and GD 1.6.2 without Freetype support. Resultantly I am not able to work with functions like imagefttext or imagettftext or the image*box counterparts either. After talking over m=with my Admin, I cannot think of installing/compiling the libraries/PHP.
So can anyone tell me a workaround for this...
|
by: CryptiqueGuy |
last post by:
Consider the variadic function with the following prototype:
int foo(int num,...);
Here 'num' specifies the number of arguments, and assume that all the
arguments that should be passed to this function are of type int.
(My question has nothing to do with the definition of the function
foo, so don't bother about it.)
If I call the function...
|
by: Yannick |
last post by:
Hi everyone -
I am not quite sure to understand what is really going on when a
function defined in one translation unit calls a function defined in a
different translation unit without knowing its prototype. Let's say for
instance :
foo.c
#include <stdio.h>
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |