Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何识别干预图像中的高棉unicode?_Php_Image_Unicode_Laravel 5_Imagemagick - Fatal编程技术网

Php 如何识别干预图像中的高棉unicode?

Php 如何识别干预图像中的高棉unicode?,php,image,unicode,laravel-5,imagemagick,Php,Image,Unicode,Laravel 5,Imagemagick,我正在使用Laravel中的干预图像包在图像上创建高棉Unicode水印,但所有这些字符都不能用Unicode格式识别 已使用的解除争议代码 // create Image from file $img = Image::make('public/foo.jpg'); // write text $img->text('The quick brown fox jumps over the lazy dog.'); // write text at position $img->t

我正在使用Laravel中的干预图像包在图像上创建高棉Unicode水印,但所有这些字符都不能用Unicode格式识别

已使用的解除争议代码

// create Image from file
$img = Image::make('public/foo.jpg');

// write text
$img->text('The quick brown fox jumps over the lazy dog.');

// write text at position
$img->text('The quick brown fox jumps over the lazy dog.', 120, 100);

// use callback to define details
$img->text('ប្រទេសកម្ពុជា', 0, 0, function($font) {
    $font->file('foo/KhmerUnicodeFont.ttf');
    $font->size(24);
    $font->color('#fdf6e3');
    $font->align('center');
    $font->valign('top');
    $font->angle(45);
});

// draw transparent text
$img->text('foo', 0, 0, function($font) {
    $font->color(array(255, 255, 255, 0.5))
});
我无法识别图像的格式


我可能建议您使用能够在不同设计工具(如Photoshop)中渲染的字体,大多数字体以Kh开头


今晚让我试试这些字体,亲爱的OSify,我尝试过这些字体,但仍然是一样的这是一个剪辑,你可以看到它只是那些字体不支持utf-8?GD php库似乎无法在创建图像时呈现高棉文字,我刚刚在我的PHP5.6上测试过,你能试用PHP7或其他吗?亲爱的OSify,我没有使用GD来渲染图像,我在php版本7.1或7.0.9上使用ImageMagick版本7,我还测试了您的字体和其他字体源,即使我从Google字体下载,但仍然一样,现在我正在尝试搜索一些教程并从php论坛询问。他们中的一些人说问题在于字体。