FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Using imagettfbbox with Arial Bold
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Using imagettfbbox with Arial Bold [message #173254 is a reply to message #173253] Thu, 31 March 2011 07:47 Go to previous messageGo to previous message
jwcarlton is currently offline  jwcarlton
Messages: 76
Registered: December 2010
Karma:
Member
> If this is your real code, it should be throwing a couple of notices:
> the $fontsize and $fontface variables are not defined inside the function.

No, I was just trying to simplify everything for the sake of the post.


> Are you using a <font> tag as reference?

Technically, it's being set via CSS in a <div>. When it renders on the
screen, it's actually more like:

<div style="font-family: Arial, Tahoma, Helvetica; font-size: 9pt">
$variable
</div>

* Not a copy & paste, so please ignore any typos


> The way TTF fonts get rendered is not unique and universal. It depends
> on the renderer and its settings. What GD2 can tell you (and should be
> telling you) is the size of the font as rendered by GD2 in that
> computer. If you want to establish a correct comparison you need to
> actually draw the font from PHP and grab a screenshot.

I'm not sure that I follow. This is my first attempt with
imagettfbbox() (and I've only barely used GD, mostly with Perl), so I
could be wrong, but I thought that this was what the above script did?

Is there a reason that it would be correct with arial.ttf, but not
arialbd.tff?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Firefox PHP error report
Next Topic: OpenSSL support => disabled (install ext/openssl)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 08:30:38 GMT 2024

Total time taken to generate the page: 0.04589 seconds