Get width of a single character from ttf-font in php?

Posted by Martti Laine on Stack Overflow See other posts from Stack Overflow or by Martti Laine
Published on 2010-03-19T19:52:44Z Indexed on 2010/03/19 20:01 UTC
Read the original article Hit count: 311

Filed under:
|
|
|
|

Hello

I'm creating an dynamic image, which creates headers on my page using PHPs GD-library. The problem is, that I need a line-wrapping system. It's not a problem itself, but first I need to get the width (in pixels) of current character.

I'm pretty curious about this, is there any way? Or do I need to manually specify width of every abc?

Martti Laine

© Stack Overflow or respective owner

Related posts about gd

Related posts about php