How to use letters as æ ø å

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Posts: 7
Joined: 2012-06-11T01:23:00-07:00
Authentication code: 13

How to use letters as æ ø å

Post by donslund »

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 :-)
User avatar
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to use letters as æ ø å

Post by fmw42 »

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.
Posts: 11
Joined: 2011-04-20T23:24:46-07:00
Authentication code: 8675308

Re: How to use letters as æ ø å

Post by Santa911 »

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?

Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to use letters as æ ø å

Post by snibgo »

@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.
snibgo's IM pages:
Posts: 44
Joined: 2009-11-28T16:35:46-07:00
Authentication code: 8675309

Re: How to use letters as æ ø å

Post by sas »


This works fine for me...

Code: Select all

convert -size 70x40 canvas:white -annotate +20+20 "æøå" a.png
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.
Post Reply