the php gd imagettftext function can only load true type fonts from a file. Is there a way that I can load it in from memory? For example I pull the file from a DB and pass the string of bytes into it somehow?
Only other option I can think of is to load the file from the db, write it to disk (if it doesn’t already exist), and then load it /w imagettftext. Is there a better way?
A temp file sounds like a pretty sound idea however I question why you would want to store it in a database. It’s going to be far more efficient to store all those TTF’s in a directory somewhere. I would then just store the path/filename. That many temporary operations to write the temp files to disk could have some considerable negative effects in a high load environment.