jdp Posted March 9, 2018 Share Posted March 9, 2018 I've been playing around with the iimagettfbbox function. The PHP is running on a hosted unix server so I uploaded the TTF font to the same directory as my PHP and everything works. Just curious if there is a way to access the "system" fonts so that I dont need to provide my own copy. Thanks Quote Link to comment Share on other sites More sharing options...
Barand Posted March 9, 2018 Share Posted March 9, 2018 Locate the font file on the server and point to it in the function call - just like I did in the sample I posted for you yesterday $sz=imagettfbbox(10,0,'c:/windows/fonts/calibri.ttf',$text); Quote Link to comment Share on other sites More sharing options...
jdp Posted March 10, 2018 Author Share Posted March 10, 2018 its a hosted unix server so that path wouldnt apply. Is there a way i can query the environment to see where the fonts are? Quote Link to comment Share on other sites More sharing options...
Solution requinix Posted March 10, 2018 Solution Share Posted March 10, 2018 Find out what distro it is then Google the default font path. Might be in /usr/share. If there are any installed at all. Or just ignore all that and upload the font you want. That's not bad or anything. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.