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 #173273 is a reply to message #173255] Fri, 01 April 2011 03:49 Go to previous messageGo to previous message
jwcarlton is currently offline  jwcarlton
Messages: 76
Registered: December 2010
Karma:
Member
> I'll try to explain myself better. A font file is basically a collection
> of mathematical primitives: a line here, a circle there, that stuff.
>
> If you want to display a letter on a printed document you need a program
> that takes those primitives and converts them into instructions for the
> printer on how to drop ink on the sheet. If you want to display a letter
> on a computer screen you need a program that converts the primitives
> into coloured pixels. And there are many possible ways to do that
> because random geometrical shapes do not normally map uniquely to pixel
> grids. Even in your own PC you'll see that fonts look completely
> different if you disable anti-aliasing, or if you optimise it for LCD
> panels or CRT monitors.
>
> Your CSS rules are rendered by the browser in the local PC and the
> browser can choose to handle the task to the operating system font
> libraries or use its own library. GD2 uses whatever version of the
> FreeType library is installed on the server.
>
> Why can't you compare GD2 with CSS? Because they use different programs
> to render the font, programs that do not even run on the same computer.
> Furthermore, you have certain amount control about the server (until you
> host upgrades PHP) but zero control about the browser.

OK, that makes sense. What I don't get, though, is why it's not
measuring correctly based on the way I've coded it? Like Natural said
(below), isn't it the same library rendering it for the screen as is
doing the measurement?

If it were an issue of the browser or monitor being off, then wouldn't
it be off for both Arial AND Arial Bold?
[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: Fri Sep 20 15:48:56 GMT 2024

Total time taken to generate the page: 0.05910 seconds