yii2 and Imagine

Hello, i created function that generates logo for my website - however it seems to be broken because it doesnt write special chars to image.


if (!$text) $text = $this->slug;


        if(is_file('@webroot/gfx/logo-'.$text)){


            return Yii::getAlias('@web').'/gfx/logo-'.$text.'.png';


        }else{

            $image = \yii\imagine\Image::text('@webroot/gfx/logo.png', $text, '@webroot/gfx/font.otf', [0,95], ['color'=>'000','size'=>9] );

            $image->save(Yii::getAlias('@webroot/gfx').'/logo-'.$text.".png");

            return Yii::getAlias('@web').'/gfx/logo-'.$text.'.png';

        }

so basically if $text == ‘asdążźćśłó’, only asd will be printed…