Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 783069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:29:16+00:00 2026-05-14T20:29:16+00:00

<?php imagettftext($im, 15, 0, 470, $m, $black, $font, this is testing of all); ?>

  • 0
<?php
imagettftext($im, 15, 0, 470, $m, $black, $font, "this is testing of all");
?>

When I run this function I get the image with uneven spaces.
like this:
this is testin g o fall

alt text http://fb.prideofhome.com/11111.JPG

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T20:29:17+00:00Added an answer on May 14, 2026 at 8:29 pm

    This is a so-called kerning problem. TrueType fonts contain information about the spacing between certain pairs of characters to achieve a natural flow of letters.

    From my experience, GD’s TrueType function imagettftext() often doesn’t use the kerning information contained in TrueType fonts, or does not use them well enough.

    Try imagefttext() first. (notice the ft instead of the ttf) It makes use of the FreeType library.

    If that doesn’t improve the result, you may have to resort to ImageMagick if your server supports it. But try the Freetype functions first.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to get PHP imagettftext() font height? I know that we
I'm trying to render images with verdana text using PHP imagettftext function. However, all
I'm using the PHP function imagettftext() to convert text into a GIF image. The
I can create an image using GD with PHP using the imagettftext() function. The
I am getting this error Could not find/open font When trying imagettftext() in PHP.
PHP code: echo date(c); //out put like this 2012-06-19T20:37:44+05:30 echo date(d M, Y); //out
PHP: I have made up a function that returns an array. I would like
I'm using this php code in image.php file to merge a png image with
the php gd imagettftext function can only load true type fonts from a file.
Basically when I draw text it's ending up black like this: https://i.stack.imgur.com/z675F.png Instead of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.