The user enters the font size, chooses font colour and uploads there chosen font in a form. All this is fine. But the trouble is I cannot load the font as it shows this error:
Warning: imageloadfont() [function.imageloadfont]: Error reading font
I move the uploaded font to a unique folder and I load the font using this code:
$font = imageloadfont("86241335505414019032012/BAUHS93.TTF");
I have downloaded the font and it works fine (loads correctly), so I am not sure why the error is there, it is before I set the new image up because I need to be able to work out the image size which is another problem I am having.
I need the image to be the font size i.e 12px of the specific font plus a 10px border on each side. The problem is how do i find out the height and the width of the font taking into account the font size?
All the rest of the script is fine but these two problems I have not found a way to fix so I hope soneone here could point me in the right direction to solve this.

New Topic/Question
Reply




MultiQuote



|