- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / include / inc_ttf_check.php
blob71ce5354b4d1707844b64c69065d6fc91f5fbe17
1 <?php
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.
8 $ttf_render=FALSE;
9 //$ttf_render=TRUE;
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';
19 if($ttf_render){
21 $font_path=$root_path.'main/imgcreator/';
22 $ttf_ok=FALSE;
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)){
28 $ttf_ok=TRUE;
29 $arial=$font_path.$ttf_fonttype;
30 }elseif(file_exists($font_path.strtoupper($ttf_fonttype))){
32 $ttf_ok=TRUE;
33 $arial=$font_path.strtoupper($ttf_fonttype);
36 }else{
37 $ttf_ok=FALSE;