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

**URL:** <https://discourse.nodered.org/t/write-utf-8-text-on-image-using-node-red-contrib-image-tools/58209>\
**Category:** General\
**Created:** [12 February 2022 11:04 UTC](https://discourse.nodered.org/t/write-utf-8-text-on-image-using-node-red-contrib-image-tools/58209 "2022-02-12T11:04:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![superace](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@superace](https://discourse.nodered.org/u/superace)\
**Post date:** [12 February 2022 11:04 UTC](https://discourse.nodered.org/t/write-utf-8-text-on-image-using-node-red-contrib-image-tools/58209/1 "2022-02-12T11:04:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [12 February 2022 11:45 UTC](https://discourse.nodered.org/t/write-utf-8-text-on-image-using-node-red-contrib-image-tools/58209/2 "2022-02-12T11:45:21Z")

</div>

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

See here for more info...

> <https://github.com/oliver-moran/jimp/blob/master/packages/plugin-print/README.md>

---

<div class="post-metadata">

**Author:** ![superace](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@superace](https://discourse.nodered.org/u/superace)\
**Post date:** [13 February 2022 13:01 UTC](https://discourse.nodered.org/t/write-utf-8-text-on-image-using-node-red-contrib-image-tools/58209/3 "2022-02-13T13:01:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 April 2022 13:01 UTC](https://discourse.nodered.org/t/write-utf-8-text-on-image-using-node-red-contrib-image-tools/58209/4 "2022-04-14T13:01:32Z")

</div>

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