2 # This subroutine detects the ttf capability of the system and checks if the arial font is available
4 # If you want to enable ttf font rendering, set the following variable to TRUE.
5 # In some cases, if your system detects ttf capability but the text does not appear, you have to disable
6 # ttf font rendering. By default, ttf rendering is disabled due to inconsequent results from different php versions.
11 # If the language is arabic or farsi, force TTF font to true
12 if($lang=='ar'||
$lang=='fa'||
$lang=='tr') $ttf_render=TRUE;
15 # Set the font type here
17 $ttf_fonttype='arial.ttf';
21 $font_path=$root_path.'main/imgcreator/';
23 # Check if TTF text possible
24 if(function_exists('ImageTTFText')){
25 # Workaround to avoid upper/lower case error
27 if(file_exists($font_path.$ttf_fonttype)){
29 $arial=$font_path.$ttf_fonttype;
30 }elseif(file_exists($font_path.strtoupper($ttf_fonttype))){
33 $arial=$font_path.strtoupper($ttf_fonttype);