-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BUG]: Phalcon\Image\Adapter\Gd throwing an exception for the text function #15188
Comments
I have created a small test case:
Here's the output when I run it from the cli:
|
Related #14950 |
@nickweavers Please try to specify absolute path to the font inside |
Okay, I have updated my example to use absolute paths:
but I still get the error:
|
To hotfix your problem, just do not specify The problem is located in cphalcon/phalcon/Image/Adapter/Gd.zep Lines 602 to 612 in a803581
|
@Jeckerson, what font will it use if one cannot be given to the text() method? |
@nickweavers It will use different approach with different functions. cphalcon/phalcon/Image/Adapter/Gd.zep Lines 641 to 654 in a803581
Check docs of |
Thank you @nickweavers for the report. This has been resolved with #15418 |
Questions? Forum: https://phalcon.link/forum or Discord: https://phalcon.link/discord
Describe the bug
Phalcon\Image\Adapter\Gd throwing an exception for the text function
I have described the issue here and what I have done to investigate:
https://stackoverflow.com/questions/64541937/phalcon-image-adapter-gd-throwing-an-exception-for-the-text-function
But I think this must be a bug because I am calling the text function with the correct parameters as per the Phalcon 3.4 docs.
I have the following in my code:
Under Phalcon 1.3.4 and php 5.4.45 it works fine, but when I migrated the application to a new server running Phalcon version 3.4.5 and php 7.3.17 the
$image->text($text, $x, $y, 1, '#FFFFFF', $fontSize, $fontFile);
is giving the following error:The literal values being passed to $image->text(..) are as follows:
When I try the example for PHP's imagettfbbox given on the page here
https://www.php.net/manual/en/function.imagettfbbox.php
the example works and shows a white box with text written across it diagonally.So it doesn't appear to be a problem with PHP imagettfbbox.
Details
sudo yum-config-manager --enable remi-php73
Additional context
Here are the php extensions that are installed:
The text was updated successfully, but these errors were encountered: