X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fclass.graphic.inc;h=81e93d25e6eab66374455f2c8b040103902f1b6a;hb=19ddc3939071044c8e94b628f1d6a039f50cc493;hp=7b7d32e9d886341116b634244a058e9d05274147;hpb=a9d55e1c13cbd6a6305b9322ec8621a06516f9f3;p=fa-stable.git diff --git a/reporting/includes/class.graphic.inc b/reporting/includes/class.graphic.inc index 7b7d32e9..81e93d25 100644 --- a/reporting/includes/class.graphic.inc +++ b/reporting/includes/class.graphic.inc @@ -149,7 +149,7 @@ class graph var $fontfile = ""; var $encoding; - function graph() + function __construct() { global $SysPrefs; $this->encoding = strtoupper($_SESSION['language']->encoding); @@ -160,7 +160,7 @@ class graph // You can also use another UTF-8 font and put it in config.php with the name in $UTF8_fontfile $this->fontfile = $this->encoding == 'UTF-8' ? (isset($SysPrefs->UTF8_fontfile) && $SysPrefs->UTF8_fontfile != "" ? $path.$SysPrefs->UTF8_fontfile : $path.'FreeSans.ttf') : $path.'LiberationSans-Regular.ttf'; - + $this->x = $this->y = $this->z = array(); $this->biggest_x = NULL; $this->biggest_y = NULL; @@ -1000,6 +1000,12 @@ class graph $size = 12; $y += $size + 3; $angle = 0; + + if ($this->encoding == 'UTF-8' && is_arabic($string)) + { + $size += 2; + $string = str_replace(" ", " ", $string); + } imagettftext($img, $size, $angle, $x, $y + $alt, $col, $this->fontfile, $string); }