Answer the question
In order to leave comments, you need to log in
Rendering of Cyrillic text on node.js gm (graphicsMagick) gives krakozyabry. How to fix?
The module graphicsMagick
"ported" to nodeJs is used ( aheckmann.github.io/gm/).
You need to open an image, overlay Russian text on it, save it under a new name:
const gm = require('gm');
gm('image.png')
.font("Lato-Regular.ttf", 36)
.fill('#333')
.drawText(200, 40, 'Кирилличекский текст')
.write('result.png', (err) => {
if (err) console.log(err);
});
Answer the question
In order to leave comments, you need to log in
windows platform? In stdin / out, the conversion curve automatically takes place.
ps Perhaps the command "chcp 65001" (switch to UTF-8) will help, but it's not clear how to execute it in the same session with gm.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question