gd-text icon indicating copy to clipboard operation
gd-text copied to clipboard

Problem with function "drawFitFontSize"

Open Kwarcek opened this issue 7 years ago • 2 comments

I've got problem with drawFitFontSize - works till go closer to border (when fontSize is bigger or text longer) - then 503 error or:

Fatal error: Maximum execution time of 300 seconds exceeded in XXX/public_html/gdtext/vendor/stil/gd-text/src/Box.php on line 476

I'm using #30

Function draw works well Function should reduce the size of text, but something is wrong and results is 503/statement up^

Kwarcek avatar Feb 21 '19 16:02 Kwarcek

Same problem here.

Solution: $precision has to be > 0

fbett avatar Apr 10 '19 18:04 fbett

Took me forever to get this function working. The extra parameters are NOT optional it seems.

Try:

$textbox->drawFitFontSize("example",0.2,100,1);

dustball avatar May 22 '19 22:05 dustball