I’m using Intervention images packages in Laravel to create Khmer Unicode watermark on the images but all those characters isn’t recognize with Unicode format
Used defualt code
JavaScript
x
// 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))
});
I got unrecognize format as the images.
Advertisement
Answer
I may suggest you to use the font that be able to render in different design tool such as for Photoshop, mostly the font start with Kh