image
image copied to clipboard
Option to add utf-8 characters on image
Can we have an option for utf-8 characters May be something like $font->encode('utf-8');.
$img->text('foo', 0, 0, function($font) {
$font->encode('utf-8');
});
Currently, it is not supporting these characters.
I have tested it with following fonts
- Arial unicode ms
- Devanagari
- Noto_Sans
All the above fonts supports hindi language
This is the expected result In Indian (Hindi) language.
इण्टरनेट पर हिन्दी के साधन
This is how it getting rendered
I faced the exact same issue. This is too frustrating and needs an urgent fix. Can anyone tell me what's going on here? Or if this is not the right place where should this be reported?
me too facing the same issue, please provide a fix asap
It seems like the language is supported but you have to select a font which supports both the languages.
There are same problem in Turkish characters. For example, it's writing '& U u m l ;' instead of 'Ü'
There are same problem in Turkish characters. For example, it's writing "Ü" instead of 'Ü'
This problem in my server. It's running in my localhost. Why can be?
I am going to +1 this issue. It would be nice to be able to use UTF-8 character.
As you can see I am missing UTF-8 characters below:
Original
Using Intervention:
I ended up with sort of a solution. I used preg_match('/([^\x00-\x7F]+)/u', $msg)
to see if the character was unicode. If it was I used a different font to render. I recommend this font: https://fontlibrary.org/en/font/gnu-unifont
as you can see unicode blocks/symbols are rendering:
Hi Author,
Can we please find a solution for this issue?
same issue, any help
I have checked this again with the current version 3. Maybe someone can help me, as I can't see a problem at the moment.
As long as the font supports the character, the result is rendered correctly in my opinion.
$text = "इण्टरनेट पर हिन्दी के साधन";
$image->text($text, 100, 100, function ($font) {
$font->filename('./ArialUnicodeMS.ttf');
$font->size(32);
});
Result Image
Have I overlooked something here?