This isn't the glyph of the Unicode replacement character (�), which has a different orientation for the square and inverted color scheme (white question mark on black, rather than black q.m. on white). What's the official name for this glyph, if it has one?
One unofficial name for this glyph is 'Tofu', says Wikipedia:
When text is rendered by a computer, sometimes that text will contain a character that cannot be displayed, because no font that contains it is installed on the computer. When this happens, a substitute character (typically a small rectangle) is shown to represent it. Those small rectangles have sometimes been called by the slang name tofu because of their visual similarity to the food of the same name. Google's aim for Noto (whose name is derived from no more tofu) is to remove this kind of 'tofu' from the Web.
The official naming for this is indeed '.notdef':
What gets drawn as .notdef glyph is for the font’s designer to figure out. Even within the rectangle convention, the sizes will vary—and some type designers take their rectangles and cross them out, or adorn with question marks:
— Marcin Wichary, Designer/Typographer: "When fonts fall", September 29, 2020.
Looking at the last picture above is confirmed when examining the LastResort font itself. Under "Glyph Name" is says "lastresorttemplate" (260) — the actual '.notdef' name (256) given to the same glyph without the question mark.
It’s one missing character to rule them all, a nicely balanced question mark inside a rounded rectangle. It being last in the chain means it will be shown for every missing character, regardless of the font you wanted, ignoring its designer’s .notdef wishes.
Making sure even the tofu looks consistent is a very Apple thing to do, but their way also shows us an opportunity.
So to spell it out: the glyph in question is a '.notdef' version, but for most applications not the '.notdef' from any particular font, as usually intended, but is overridden by a the '.notdef' respresentation from special font called '.LastResort' built into the OS (at ). That glyph has then the internal 'glyph name' "lastresorttemplate".
Fonts can include a character called
.notdef, which will be displayed when any glyph not defined in the font is requested. It is entirely up to the font designer what shape this glyph is.
Microsoft's OpenType guidelines say:
It is recommended that the shape of the .notdef glyph be either an empty rectangle, a rectangle with a question mark inside of it, or a rectangle with an “X”.
San Francisco, however, uses six horizontal lines.
So, it has a name based on its use as the
.notdef glyph, whatever shape it is, but that particular symbol doesn't have its own name independently. (Ahhhh.)
The closest document covering the requirements for developers to use the missing character glyph is in the TrueTyoe Reference.
If there is an official name for this, where it’s documented escapes me as well.