374 posts
  • 6 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 2
+4 more
_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
  • 7 Years of Membership
  • Affiliate Level 2
  • Author Level 4
  • Collector Level 1
+6 more
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
  • 6 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 2
+4 more
_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