imagettftext

PHP 5 and ImageTTFText() suddendly stopped working with XFILES.TTF

Hi We have a very weird problem concerning the use of a TTF-font with a specific name(!) in PHP5 running in Apache: ... $ttf = "./XFILES.TTF"; //Schriftart ImageTTFText($img, $ttfsize, $angle, $t_x, $t_y, $color, $ttf, $text); The font file doesn't work anymore when it is named XFILES.TTF - no errors are displayed, the text just is...

imagettfbbox() returns wrong dimensions when using space characters inside text

Hi, I'm creating a graphical menu dynamically from PHP, it results in only 1 image that looks like this: One Two Three Four The problem however is, that I have to determine the x-offset and the width of each page title (e.g. the left offset and the width of "One" in pixels) to position the image with css. All works fine, ...

PHP GD Text/Transparency/alpha problem.

alright so im having a problem with getting my text layed over a partly transparent image. i want the text to be solid, but i want part of the background of the image to be transparent, and the part the text is over to be solid, which i have, the problem is the text is inheriting the transparent background of one of the previous layers. ...

Accented characters not showing when using imagettftext with otf but showing with ttf

I'm using imagettftext to generate images from OpenType files. Everything works until I try to use an accented character (e.g. å) or a character such as √. In their place I get the .notdef glyph. The fonts I'm using definitely have these characters. To make things even more frustrating, when I use a TTF everything works as expected. An...

Why imagettftext does not work?

I have problems with the "imagettftext" function. The following code works if I comment the problematic line (I see a yellow rectangle). session_start(); $text = $_SESSION['code']; header("Content-type: image/gif"); $image = imagecreate(150, 15); $red_bg = 255; $green_bg = 255; $blue_bg = 155; $bg_col = imagecolorallocate($image, $red_b...

Right align text in an image with imagettftext(), PHP

I am setting up dynamic forum signature images for my users and I want to be able to put their username on the image. I am able to do this just fine, but since usernames are different lengths and I want to right align the username, how can I go about doing this when I have to set x & y coordinates. $im = imagecreatefromjpeg("/path/to/b...

PHP imagettftext: bounding boxes of letters superimpose above each other

I'm writing text-images on the fly with PHPs imagettftext, which works fine so far, but I have a very strange problem. We are using a very italicized font and apparently the bounding boxes of later letters are sometimes superimposing their background over previous letters, thus cutting into them. A screenshot of the effect can be seen...

Missing chars in JpGraph

I have a web site that runs on Windows and uses cp1252 (aka Win-1252) so it can display Spanish characters. The app generates some plots with JpGraph 2.3. These plots use the Tahoma Open Type font family to display text labels. Strings are provided in ANSI (i.e., cp1252) and font files support cp1252 (actually, the *.ttf files were copie...

imagettfbbox & imagettftext - resize,position,rotate...

Ok, now it's officialy 10 hours that I'm trying to make this work, but by every minute I'm farther and farther from the final goal... The thing is, I need to create a function, class or whatever that by the selected TTF or truetype font create, properly resize, and fill the image with a text given by the url. The image shouldn't be long...

Imagettftext like C function

I need to implement a functionality similar to PHP's imagettftext function. I need to enter a text and output a bmp image based on that. I already looked at freetype but it converts character by character and is not suitable to convert the whole text to an image. I am stuck at the moment. How can I access the source code of imagettftext ...

Unexplained spacing between chars in text when converted to image

Hello All, I've been using a system with imagettftext for a while now to add nog standard fonts to websites. I've abandoned this method for better options a few months back but I've encountered a problem on one of the websites I've created over a year ago. The website has been moved to a new server, aside from stability issues and perf...

Simultaneous imagettftext to images

How can I use imagettftext in a loop-way so I can write the same data to the same image, if the image is just a different color? I have 6 different colors of the same image... but how could I make a loop so it imagettftext's all the colors..? It's the same data so nothing changes except the image color itself. I want to be able to write...

PHP imagefttext (imagettftext) not displaying anything

I'm almost positive that there is a stupid reason this is not working, but I just can't figure this one out. I'm just trying to print out some text as a graphic with imagettftext, but I can't get the words to display. This is on a GoDaddy server, so I don't control everything, but here are the specs from phpinfo(): PHP Version 5.2.14...