473,387 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

ImageTTFText can't find/open ttf fonts

bof
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"

phpinfo() reports:
PHP Version 4.3.4
GD Version bundled (2.0.15 compatible)

also running under apache built from 2.0.47 under Win XP
In summary: I can get OpenType fonts to render, any advice on how to get
TrueType fonts working?
MTIA, if replying by email please use address in sig
--
bof at bof dot me dot uk
Jul 17 '05 #1
1 9120
bof
In message <ju**************@invalid.domain>, bof
<no*********@hotmail.com> writes
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"

phpinfo() reports:
PHP Version 4.3.4
GD Version bundled (2.0.15 compatible)

also running under apache built from 2.0.47 under Win XP
In summary: I can get OpenType fonts to render, any advice on how to
get TrueType fonts working?

Finally resolved this by using the DOS path name to the font and all now
appears OK; it must have just been chance that the fonts I chose to test
on that worked happened to have a path name that was the same in Windows
and DOS

--
bof at bof dot me dot uk
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
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",...
0
by: Leif Wessman | last post by:
I'm using a bundled version of GD: 2.0.23 compatible. When using the function imagettftext() with a negative color to get a aliased text, the text gets grainy. What could be wrong? I've tried...
3
by: Leif Wessman | last post by:
From: http://www.php.net/manual/en/function.imagettftext.php "color is the color index. Using the negative of a color index has the effect of turning off antialiasing." I'm using a bundled...
1
by: Axier | last post by:
I cannot get the swedish character set on images. What can be wrong? I would very much appreciate help. regards, axier I can supply some code here and a link:...
0
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...
1
by: binderup | last post by:
PHP 4.3.11 on Ubuntu Linux with GD2 I have compiled and installed PHP with these arguments: './configure' '--with-apxs=/www/bin/apxs' '--with-zlib' '--enable-exif' '--with-gd'...
3
by: Matt | last post by:
I'm not real sure how the drawing & image fxns work in php, so please bear with me... I'm using a script (logo.php) to draw a simple logo -- basically text with a shaded background. It looks...
1
by: Steve Belanger | last post by:
Hi, i am creating a 'design online' flash tool that allows me to design something with flash, throwing graphics and text elements. i then export that using XML data and have PHP create a jpeg...
1
by: Nitzan Tomer | last post by:
hi everyone, i created a script that outputs an image (transparent with text) based on parameters passed by $_GET. everything in my application works with 'pixels' and since GD2 this function...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.