Posted by sgabe on May 22, 2009 at 1:59pm
3 followers
Jump to:
| Project: | Textimage |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I would like to use this module with accentuated letters. With lower case letters it works fine, but with the same letters in uppercase (ÉÁŰŐÚÖÜÓÍ) it doesn't. Is there a solution to this problem? I didn't find help so far...
Comments
#1
I found the exact problem: The $bheight variable and the $y variable in the imagettftext() function need to be bigger with 5 pixel... Otherwise the accent is cut off from the image.
#2
Hi sgabe,
Increasing by 5 pixels may fix this case, but if you rotated the image or changed the font face or size it would not longer be the correct fix. I will have a play with this issue shortly and see that I can come up with a better fix for you.
Cheers,
Deciphered.
#3
Hi Deciphered,
You are absolutely right, I think this may be a solution only for this one exact case. Anyway I just wanted to help with some hint, so you guys know where to look.
Cheers,
sgabe
#4
Hi sgabe,
It only occurred to me this morning to check what version you where using, which I see is 2.1. Try downloading the latest development build, there's changes to prevent character cutoff that should fix this exact problem.
Give it a shot and let me know how it goes.
Cheers,
Deciphered.
#5
Hi Deciphered,
I upgraded to the latest dev version and it's better but not perfect, 70 percent of the accent is still out of sight.
Cheers,
sgabe
#6
Hi sgabe,
I'm still looking into solutions for this issue (that I am happy with). I haven't had a lot of time to dedicate to Textimage of late, but rest assured I will not forget this issue and fully intend to have it fixed for the release of 2.2.
Cheers,
Deciphered.
#7
Thanks a lot for all your efforts to fix this issue!
#8
Make sure that you use an truetype font (.ttf) instead of an opent ype font (.otf), as PHP/GD only has limited support for open type fonts. That did the trick for me atleast.
#9
Sorry, I didn't mention it but the problem occurs with TrueType font of course. I'm still increasing the dimensions by 5 pixel, that solves the problem until a real solution.