Reputation: 1643
exec($IM_path."convert
-size 800x300 xc:black
-font ".$linktottf."
-pointsize 16
-draw \"fill white stroke none decorate underline text 580,28 Kühle Frische, not working\"
output.png");
The "draw text"-part in the code above doesn't work. the output.png displays only "Khle" … so there must be a problem with Special Characters, Whitespaces, Quotes, …
I tried a lot (escaping, different quotes, backslashes, …)
I've lost a lot of time now … so this is why I hope you could help me. Thx!
Upvotes: 0
Views: 851
Reputation: 42736
if you want the quotes drawn as well you need to enclose them in a different set of quotes, double quotes wrapped in single quotes.
label:'\"fill white stroke none decorate underline text 580,28 Kühle Frische, not working\"'
As for the special characters try saving your script in unix utf-8 format (editors like Textpad have options for saving files as these when showing the save dialog, similar editors should have the same option).
And set the system LANG to use utf
LANG=en_US.utf-8;
exec("LANG=en_US.utf-8; ".$IM_path."convert -size 800x300 xc:black -font ".$linktottf." -pointsize 16 label:'\"fill white stroke none decorate underline text 580,28 Kühle Frische, not working\"' output.png");
Looks like you want 'label' and not draw. also it needs to be on one line otherwise it will interpret it as separate commands
Upvotes: 1