New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text method different output the Chinese/Japanese string which use the gd/imagic. #1339
Comments
I can not reproduce this issue. Please make sure that you are using the latest version of the GD and/or Imagick library and a font that supports the corresponding characters. $image = ImageManager::withDriver($driver)
->create(300, 300)
->fill('fff');
$image->text("中国", 150, 150, function ($font) {
$font->filename('ArialUnicodeMS.ttf');
$font->size(70);
$font->color('000');
$font->align('center');
$font->valign('middle');
}); PHP Version: 8.3.4 Result Image (GD)Result Image (Imagick) |
$fonts = "/fonts/msyh.ttf";
$mgr = Intervention\Image\ImageManager::imagick();
//$mgr = Intervention\Image\ImageManager::gd();
$img = $mgr->create(400,300);
$text="我是中国人";
$txt_color="rgba(121,143,85,1)";
$img->text($text,50,100,function (Intervention\Image\Typography\FontFactory $font) use ($fonts,$txt_color){
$font->file($fonts);
$font->size(30);
$font->color($txt_color);
$font->align('left');
$font->valign('bottom');
}); This image is build by imagick: PHP Version 8.3.6 Intervention Image Version: 3.6.2 |
Describe the bug
gd output chinese string need to unicode
imagic not need
Code Example
Expected behavior
do not toUnicode when use the gd.
The text was updated successfully, but these errors were encountered: