Using unicode from a file with label:@
Posted: 2011-03-26T16:01:00-07:00
I can't get IM to generate text from a file containing unicode characters referenced from label:@. If I use a file containing the equivalent UTF-8 string it works fine.
For example, I created utf-8 and unicode text files which in Times-New-Roman font contain four symbols: upper case greek PI, upper case greek sigma, upper half of the integral sign and the lower half of the integral sign.
The command using utf-8 is:
which creates this image: http://members.shaw.ca/el.supremo/times_utf.png
but the unicode command:
only produces this: http://members.shaw.ca/el.supremo/times_uni_hi.png
I thought it might be a problem with little/big-endianness so I swapped each pair of bytes in the file to produce times_unicode_lo.txt:
but this is no better: http://members.shaw.ca/el.supremo/times_uni_lo.png
The text files are (use right click to download):
times_utf.txt
times_unicode_hi.txt
times_unicode_lo.txt
How do I get IM to handle unicode in a file?
Pete
For example, I created utf-8 and unicode text files which in Times-New-Roman font contain four symbols: upper case greek PI, upper case greek sigma, upper half of the integral sign and the lower half of the integral sign.
The command using utf-8 is:
Code: Select all
convert -font Times-New-Roman -pointsize 36 "label:@times_utf.txt" times_utf.png
but the unicode command:
Code: Select all
convert -font Times-New-Roman -pointsize 36 -encoding Unicode "label:@times_unicode_hi.txt" times_uni_hi.png
I thought it might be a problem with little/big-endianness so I swapped each pair of bytes in the file to produce times_unicode_lo.txt:
Code: Select all
convert -font Times-New-Roman -pointsize 36 -encoding Unicode "label:@times_unicode_hi.txt" times_uni_lo.png
The text files are (use right click to download):
times_utf.txt
times_unicode_hi.txt
times_unicode_lo.txt
How do I get IM to handle unicode in a file?
Pete