374 posts
  • Bought between 10 and 49 items
  • Contributed a Blog Post
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • Sold between 1 000 and 5 000 dollars
_rohan says

I’m using imagettftext() to create a string image with some text. The font file is over 1MB in size, yet the PHP file takes barely a second to open. My connection isn’t that fast, so I assume the font is begin used server-side.

Question is, does the sever load the file each time the PHP file is accessed? Because if so, the bandwidth used will be 1 MB each time, and I’ll run out of bandwidth very quickly.

Thanks for replying.

94 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 10 and 49 users
  • Sold between 5 000 and 10 000 dollars
  • United Kingdom
JimmyP says

The font will be accessed every time the file is accessed (assuming that it’s not cached by the client) but that won’t have an effect on your bandwidth consumption – the font is not transferred between the server and the client – it remains on the server – only the rendered image is transferred.

374 posts
  • Bought between 10 and 49 items
  • Contributed a Blog Post
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • Sold between 1 000 and 5 000 dollars
_rohan says
The font will be accessed every time the file is accessed (assuming that it’s not cached by the client) but that won’t have an effect on your bandwidth consumption – the font is not transferred between the server and the client – it remains on the server – only the rendered image is transferred.

Thanks, that clears stuff up.

by
by
by
by
by
by