Gm library does not show unicode character

So I wanted to display Unicode characters with gm and so I decided to use a unicode font. I ended up using arial unicode ms (I couldn't figure out how to use the google noto family and "include" individual ttf files).

After trying to print a character where arial unicode ms included ex: (unicode 5909 (変)) it showed how ?.

Below is a snippet of my code.

gm('./folder/some_image.jpg')
.font('./folder/arial_unicode_ms.ttf')
.fill('#000000')
.fontSize('20px')
.drawText(0, 0, `変`);

      

So the question is how to print unicode characters from gm in nodejs.

+3


source to share





All Articles