Anthony Tribby on wrote...
| Using -caption or other commands for text, single-quote characters
| are the delimiter. What (if anything) can I do to "escape out" a
| single quote if I actually want to have an apostrophe in my text? I
| tried what seemed most obvious (preceding it with a backslash) but
| that didn't work.
|
This is actually not a IM problem, but a problem with the shell or
program calling IM. The only time I dealt with this problem in IM
examples was for quotesing within quotes, within quotes for the -draw
'text' arguments.
Drawing Special Characters in the Text String
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/draw/#special
If you are using a UNIX shell, the solution is to use the other
quotes...
caption:"Anthony's Caption"
OR backslash the apostrophe outside the quotes...
caption:'Anthony'\''s Caption'
For other API languages, you will have to figure it out or ask the
appropriate group.
Alturnativally... read it from a file
caption:@caption.txt
| Beyond that, I'd actually like to run a convert/replace routine on my
| text overall to produce "smart quotes", but I have no idea what
| characters/codes I need to embed in my text for IM to produce the
| corresponding open/close quotes.
|
Actually if you want different open and close quotes, look up the
appropriate UniCode codes and feed in a UTF-8 encoded string.
Hmmm
env LC_CTYPE=en_AU.utf8 \
printf "\u2018single\u2019 - \u201Cdouble\u201D" | \
convert -font Arial -pointsize 48 label:@- quotes.png
For more examples see...
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/text/#unicode
The above example was added to this section.
Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
If all else fails, do the exact opposite of what you thought would work.
-- Dr Whirlwinds 10th law
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users