2

Is there a way in PIL to return something that says that a particular character was not properly decoded and so a tofu was inserted in the resulting image?

I want some indication that a tofu was inserted in the image...so I could ensure that I can fallback to another font-family when needed.

The above question is same as: ImageFont detect missing glyph (Python Pillow)

user1717931
  • 2,419
  • 5
  • 29
  • 40
  • You'll probably need a lower-level text-drawing API than what PIL can provide. – AKX May 25 '21 at 14:39
  • Likely cumbersome, but: Draw exact the same text in white on some black canvas and run some OCR like tesseract while filtering on the desired character!? Not sure, if tesseract is capable to detect those characters. – HansHirse May 25 '21 at 14:42

0 Answers0