'CV2 puttext is not adding special characters

I am trying to update text om images using CV2.Puttext feature. Its adding all english words properly but special/asci characters like №,■,<<,etc.. are not added on the image , ?? is added instead of special characters. Below is the puttext code, i am using cv2.FONT_HERSHEY_PLAIN font.How can we add above charcters also in image using CV2.puttext ? i know i can use draw.text but i want to add using cv2.puttext only.

cv2.putText(img, "■Yes and №",(x, y), cv2.FONT_HERSHEY_PLAIN,2.3, (128,128,0), 3)

Please share your thoughts on this.

Thanks



Solution 1:[1]

The Hershey fonts are not Unicode. They don't even have the full ASCII subset. It was designed for simple annotation, not for sophisticated text processing. You'll have to use another method.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tim Roberts