1

I need to get a width of text in some universal points. This calculation should take into account different widths of letters. imagettfbbox() is not an option in my case. Any other ideas?

yegor256
  • 102,010
  • 123
  • 446
  • 597
  • 1
    Can you be more specific? What are you doing and why is imagettfbbox no option? I hope you mean text transformed to an image. Otherwise if you mean text output normally (say html) to the user you can't detect the width as every browser could have different font-settings, zoom, .... – jitter Oct 13 '09 at 07:27
  • The question is indeed too vague. I could think of several answers to this, but don't want to type them all. – slikts Oct 13 '09 at 07:39
  • I think he's looking for the width of the actual letter(s) like iiii has a different width than WWWW with certain fonts – Phill Pafford Oct 14 '09 at 12:45

1 Answers1

1

it's not PHP but I think it answers your question, Link

Community
  • 1
  • 1
Phill Pafford
  • 83,471
  • 91
  • 263
  • 383