View Full Version : Fix Graph Titles

10-08-2015, 07:52 AM
My first solution works fine if translations files can be translated to ISO-8859-1 (this is my case).

The PHPlot uses imagestring, imagestringup, from the GD library to render text on the image, and it must to be translated to use imageTTFtext instead.

imagestring-function doesn't properly show UTF-8 characters.

As workaround is use the imagettftext-function.

When using imageTTFtext instead of imagestring, you have to know, that you don't use the $font-ids from PHP, instead you use fontfiles.

So: imagestring ( resource $im, int $font, int $x, int $y, string $s, int $color )
Becomes to: imagettftext ( resource $im, int $size, int $angle, int $x, int $y, int $color, string $fontfile, string $text )

I will try to fix the Class to use UTF-8 by default replacing those functions on the next days, but you still needing to upload a font file with all characters for your translation files, if the mine does not support them (like japanese, chinese, etc).

More... (http://addons.oscommerce.com/info/9368)