Closed LeQuangKhai99 closed 11 months ago
Hi @LeQuangKhai99 what version are you using? The current version checks if the path to the font exists (this happens in Label::create) while the imagettfbbox method is called later, when writing the image. So it appears that the font does exist but it can't be opened. Please put a debug statement in the LoadImageData class just before the imagettfbbox method and tell me what $label->getFont()->getPath()
resolves to and what file_exists($label->getFont()->getPath())
resolves to.
Hi @endroid, file_exists($label->getFont()->getPath()) return true.
noto_sans.oft is exist
Thank you. And the output of the path please. And could you try using realpath() around the path, like $labelBox = imagettfbbox(realpath($label->getFont()->getSize()), 0, $label->getFont()->getPath(), $label->getText());
And if that does not work, what does file_get_contents
give? Can it read the file?
@endroid I'm sorry, i was installed this package to another project and it work well. I think i will uninstall and try again. Thanks!
Np, glad to hear your problem is solved!
I have error It error when i add label. It seems like it can't read the default font file