Questions tagged [imagettftext]

174 questions
3
votes
0 answers

How to make text-align center in imagettftext()

I couldn't able to get this working. See the picture below (this is im showing in a div tag): html code is

t-shirt is the giveaway

How can i achieve the same thing displayed in the image using imagettftext()
agurchand
  • 1,635
  • 3
  • 15
  • 25
2
votes
1 answer

Add text from user input to an image [imagettftext]

Trying to find a way of doing this, but going round in circles. What we are trying to achieve is like this I have read up on : http://php.net/manual/en/function.imagettftext.php and http://us2.php.net/manual/en/function.imagejpeg.php I am just going…
422
  • 5,714
  • 23
  • 83
  • 139
2
votes
0 answers

Multiple text colors in one image using imagettftext

I am trying to output some text using imagettftext. I can do this easily enough to get text that is all one color. What I would like to do is have individual words be different colors. Is this possible using this function? My other thought was to…
Terry Waltz
  • 121
  • 2
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
1 answer

Create a ttf file with emoji

I have a folder with all the .png emojis and I should compact them in a ttf file to flash it with magisk but I don't know how to create the .ttf file, how can I do?
Sarti
  • 21
  • 2
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,166
  • 3
  • 25
  • 44
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
  • 69,002
  • 70
  • 275
  • 438
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
0 answers

Imagettftext not producing correct results if I use the tamil lanuage ttf?

I am trying to write Tamil text on an image. I tried with different font files like latha.ttf and Uni Ila.Sundaram-01.ttf files. The problem is that the vowels are getting misplaced. Please see the image for reference. Can anyone please suggest …
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,639
  • 9
  • 40
  • 73
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
  • 916
  • 1
  • 11
  • 35
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,998
  • 7
  • 37
  • 69
1 2
3
11 12