Search code examples
unicodefontsspecial-charactersglyph

Is there a "glyph not found" character?


Let's assume we have a text that contains a Unicode character that cannot be displayed because our font has no corresponding glyph. Usually, a placeholder is displayed instead, e.g. a rectangular block thingy (see screenshot).

Is there a "glyph not found" character that reliably produces this glyph? I'd like to write something like "If the following text contains <insert character here> then you need another font..." in a UI.

By the way, I am not talking about � (replacement character). This one is displayed when a Unicode character could not be correctly decoded from a data stream. It does not necessarily produce the same glyph:

enter image description here


Solution

  • No, there is no “glyph not found” character. Different programs use different graphic presentations. An empty narrow rectangle is a common rendering, but not the only one. It could also be a rectangle with a question mark in it or with the code number of the character, in hexadecimal, in it.

    So it is better to e.g. display a small image of the character along with the character itself, so that the reader can compare them.