How can I use Danish letters as æ ø å in text strings in ImageMagick?
My string is utf-8 encoded, but IM just skips the letters.
convert julekort/julekort2.jpg -gravity south -stroke none -pointsize 25 -font /link/to/fonts/Oswald-Regular.otf -fill black -annotate +0+55 'Glædelig jul til alle mine venner0x064 ø å' 'cards/1418495633.jpg'
I use the font some other places in my HTML and know that it contains æ ø and å.
Please help
How to use letters as æ ø å
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to use letters as æ ø å
Try putting your text in a UTF8 compatible text file so that you see the characters are correct. Then use the textfile to read your text message using -annotate +0+55 "@textfile". I think you should try using double quotes rather than single quotes. Some systems to do not like single quotes as I recall.
Re: How to use letters as æ ø å
Hi DonsLund,
Have you managed to find a good way of solving the æøå problem with ImageMagick? I have succeded using the workaround from fmw42 (Thanx by the way), but I would like to solve it directly in the commandline without creating a temp-file. I have tried working with some Unicode settings, but not with any luck. Can you help?
Lars
Have you managed to find a good way of solving the æøå problem with ImageMagick? I have succeded using the workaround from fmw42 (Thanx by the way), but I would like to solve it directly in the commandline without creating a temp-file. I have tried working with some Unicode settings, but not with any luck. Can you help?
Lars
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to use letters as æ ø å
@Santa911: The original poster may not be reading this, after two years.
We may be able to help, if you tell us the IM version you are using, your platform (Unix, Windows, whatever) and your exact command.
We may be able to help, if you tell us the IM version you are using, your platform (Unix, Windows, whatever) and your exact command.
snibgo's IM pages: im.snibgo.com
Re: How to use letters as æ ø å
@Santa911:
This works fine for me...
This is on Linux, using a shell that is configured to use the "en_US.UTF-8" locale.
If it doesn't work for you, you probably need to make sure you're using a UTF-8 locale.
This works fine for me...
Code: Select all
convert -size 70x40 canvas:white -annotate +20+20 "æøå" a.png
If it doesn't work for you, you probably need to make sure you're using a UTF-8 locale.