Menu

#454 Special characters on Windows 10

v1.0_(example)
open
nobody
None
5
2024-12-11
2017-09-06
No

Hello,
I'm working on multiplatform application (windows, unix / mac) and need to process images (inprint text, resize, ...). I have tried to use the graphicmagick for this purpose but I'm getting weird results. Please can you advice ?

I'have installed on Windows: GraphicsMagick-1.3.26-Q16-win64-dll
I'm using following command:
gm convert -encoding "Unicode" -font "Calibri" -draw "text 100,100 '-лисица-'" orig.jpg _yyy.jpg

The output image contains "?????" instead of "лисица", the same command on Mac/Unix insert proper characters into image.

I have also tried to use ImageMagick with the same arguments and got correct results also on Windows, therefore I assume that there is no "Font" issue.
magick convert -encoding "Unicode" -font "Calibri" -draw "text 100,100 '-лисица-'" orig.jpg _yyy.jpg

Please can you advice how to fix this issue? I would like to use GraphicMagick instead of ImageMagick due the performanca and resource issues.

Best regards

P.S: This issue is also tracked at: https://github.com/aheckmann/gm/issues/678 (activity is quite in a past threfore i'm also posting it here)

Discussion

  • whitecat

    whitecat - 2024-12-09

    Any progress on this? I'm able to reproduce this behaviour easily with GraphicsMagic 1.3.45 on Windows 11 Professional 23H2 and the built-in Arial font (c:\windows\fonts\arial.ttf), which is UTF8-capable and ImmageMagick renders the same string correctly. Use any string with Cyrillic or Grekk letters.

    Thank you.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2024-12-10

    This issue was not even on my radar. I closed duplicate issue 455.

    I wonder if the locale of the user environment is also in Unicode (assuming UTF-8) or if some translation needs to be supplied to convert from the user's locale to Unicode?

    Assistance from those who are knowledgeable regarding these topics (particularly under Microsoft Windows) is appreciated.

     
    • Milos Komarcevic

      See https://github.com/aheckmann/gm/issues/678#issuecomment-2535341655

      This "fix" is relatively painless and should cover 95% of Windows users...

       

      Last edit: Milos Komarcevic 2024-12-11

Log in to post a comment.

MongoDB Logo MongoDB