مرحبا
function check_ttf_size($Schriftgröße, $Rotation, $ttf, $text, $Image_Width, $Image_Height) {
$textbox = calculateTextBox($Schriftgröße, $Rotation, $ttf, $text);
^^
if(($textbox["width"] < $Image_Width) and ($textbox["height"] < $Image_Height)){
check_ttf_size($Schriftgröße + 1, $Rotation, $ttf, $text, $Image_Width, $Image_Height);
return?
}else{
return $Schriftgröße - 1;
}
}
Das fällt mir gleich auf dem ersten Blick auf.
mfg