Questions tagged [imagettftext]

174 questions
2
votes
3 answers

Filled rectangles instead of text while using imagettftext

I have some problems with rendering text using imagettftext(); Somehow it just shows filled rectangles. No errors at all. http://postimage.org/image/k61c8xi0n/ PHP Version: 5.3.8 GD Support: Enabled GD Version: bundled (2.0.34 compatible) Freetype…
2
votes
2 answers

Source Imagettftext

I need the source of this function (imagettftext) in php. I can't find the source (it is implemented by php). Somebody knows where can I find it? Best regards
2
votes
1 answer

imagettftext and the euro sign

I'm using imagettftext to generate a image (I've tried imagefttext as well) but I cannot display the EURO Sign. Look at how it makes it! The font is Myriad and in Photoshop the sign looks fine.
Ciprian Mocanu
  • 2,026
  • 3
  • 25
  • 41
2
votes
1 answer

Character to Glyph mapping table

I am following the documentation on apple.com. I managed to get The 'cmap' encoding subtables. I know 100% that platformID, platformSpecificID are correct, but offset is suspicious. Here is the data: array(3) { [0]=> array(3) { …
Gajus
  • 55,791
  • 58
  • 236
  • 384
2
votes
2 answers

Adding string to output PHP file

So I have this code: imagepng($image, 'Result.png'); It will create Result.png file in my server in the same folder Now I wonder, how to create file like Result123.png Result1256.png Both 123 and 1256 is a value of $text Thanks
2
votes
1 answer

imagefttext get text from database

I want to make ID card for members that registered on my web. After user register they can click print and ID card generated (png or jpg). I use PHP function imagettftext but it's not working. I don't know where is wrong code. My code:…
ahmadbagwi
  • 48
  • 1
  • 8
2
votes
1 answer

Watermark text position bottom right

I am using following code to set watermark, but it sets watermark to the center, I want to set it bottom right position.
Pathik Vejani
  • 4,048
  • 6
  • 47
  • 84
2
votes
1 answer

PHP imagettftext() with korean characters are not working

I am trying to generate image with some text and I have wrote following code:
Mr.Happy
  • 2,559
  • 8
  • 32
  • 67
2
votes
0 answers

How to remove reference to ttf file after using imagettftext?

I'm currently developing a captcha system for the site I'm currently developing for a school project.. here: http://rjtestsystem.atwebpages.com/ Here's the code, err, prototype I came up with so far:
RJBaytos
  • 71
  • 1
  • 8
2
votes
1 answer

Wrap text using PHP GD Lib - imagettftext

I am overlaying text on an image using GD lib. I want to wrap a string within a bounding box and get the best fit for the text as possible. Here's what I've got so far: //dimension of the image I'm placing the text on $img_w =…
MP_Webby
  • 807
  • 1
  • 8
  • 31
2
votes
1 answer

PHP imagettftext() center text

I want to center the text I add to my image using : imagettftext($image, 85, 0, 250, 350, $color, $font, $txt ); I tried something like this : $fontwidth1 = imagefontwidth($font); $center1 = (imagesx($image)/2) -…
BRDS
  • 79
  • 1
  • 5
2
votes
1 answer

PHP imagettftext return bounding box differs from rendered bounding box

I'm using imagettftext to render a PNG file. A call to imagettftext() returns the bounding box that the text was rendered in, but on closer inspection, the text is being rendered slightly outside of it's own bounding box! The bounding box is correct…
Conor Taylor
  • 2,736
  • 7
  • 32
  • 63
2
votes
1 answer

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,…
Roman
  • 97,757
  • 149
  • 317
  • 426
2
votes
3 answers

Generate Captcha Image PHP

I want to generate Captcha Image using PHP imagettftext. And following is my code. It gives an empty image. I want to resolve this issue. I have tested the code but was unable to find why the image is not bieng showed although my random text is…
Adi's
  • 104
  • 1
  • 1
  • 15
2
votes
2 answers

Captcha image generating problems when using font PHP

its working perfect, until i try to use a font for text. This is my code.. The 3er line commented now is the one that works fine... but in this example im trying to replace this line with imagettftext.. not lucky. Whats my error? $newImage =…
Jules Martinez
  • 662
  • 1
  • 6
  • 22
1 2
3
11 12