Write UTF-8 text on image using node-red-contrib-image-tools?

Hi,
First, a huge thank you for this amazing node. It does almost everything and then some. But, is there a trick to write text on an image when the text is Unicode UTF-8? For example this. 北京

I want to make image1 with Chinese characters, then merge it with a QR code (image2) so the result is image3 with the QR in the center. The excellent example how to merge images provided in a different thread did this amazingly well except the Unicode problem.

I can get text on an image but I only get ???? when using Chinese characters. For example the string "A北京 B" will be written on the image as A??B Is there a trick around this? I do get Chinese characters encoded in the QR code data, that part works great. It is "just" text on image I fail to understand.

Hopefully this is a "me" problem and there is a super duper easy way to make this happen. Any ideas or tips?

Thank you

You will need to add a font with those characters. The type of font you need is a BMFont.

See here for more info...

Thank you for explaining. I will try that way, Chinese is a bit different because there is a huge number of characters (+30k ). If I want to do free text I need to predict what people want to write and make sure those characters are included in the font.

Again a huge thank you for the image tool node.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.