I’m using https://github.com/Intervention/image in my laravel
Project to generate a watermark on the image. I download and use fonts from https://fonts.google.com and https://github.com/osify/cambodianfonts/tree/master/Unicode/Compartible-with-Photoshop-CS3 Both not working.
I wrote code
$textFont = public_path('Khmer/Khmer-Regular.ttf');
$template = Image::make($this->disk->path($user->avatar));
$text = "កម្ពុជា";
$template->text($text, 190, 600, function ($font) use ($textFont) {
$font->file($textFont);
$font->size(30);
$font->color('#bc1f1f');
// $font->align('center');
$font->valign('top');
$font->angle(0);
});
Missing font result
So, Please help suggestion any code or solutions.
Note* I also read and follow
How to recognize khmer unicode in intervention images?
https://github.com/Intervention/image/issues/702
But it is also no solution.
and
2
Answers
I really want to use the only PHP.
If I use java working well with code below.
I also try with KH-font but it is not working.
My Solution:
Here is Result