Page 1 of 1

How to use letters as æ ø å

Posted: 2014-12-15T04:15:59-07:00
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 :-)

Re: How to use letters as æ ø å

Posted: 2014-12-15T09:43:17-07:00
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.

Re: How to use letters as æ ø å

Posted: 2016-05-01T00:30:03-07:00
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?

Lars

Re: How to use letters as æ ø å

Posted: 2016-05-01T05:40:53-07:00
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.

Re: How to use letters as æ ø å

Posted: 2016-05-02T05:38:45-07:00
by sas
@Santa911:

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.