The PHP manual page for imagettfbbox
says:
fontfile The name of the TrueType font file (can be a URL)
but passing a URL gives a Unable to access
error.
I have a number of fonts on my Amazon S3 account, like http://bililite.s3.amazonaws.com/webservices/fonts/Lilly.ttf and I'd like to use them on a webpage, with
$box = imagettfbbox (12, 0,
'http://bililite.s3.amazonaws.com/webservices/fonts/Lilly.ttf', 'Hello, World');
But I just get the error. I've tried it on two different servers with two different providers, and other URL's besides S3 and get the same error. The URL is valid; I can download the font. allow_url_fopen
is set.
Is the manual wrong about using URL's? If I'm stuck, I can curl the font URL into a temporary file and use that, but I'd rather not.