title: In Windows, how to detect if a Unicode character renders as square (tofu)?
body: <p>I'm writing a simple bitmap font renderer for OpenGL and I'd like to render some Unicode as well. However, in many fonts some characters are missing and are rendered as squares. These consequently waste space in my texture and I'd like to get rid of them. Is there a WinAPI function to detect whether a certain character will be rendered as a tofu square using a certain font?</p>
  
  <p>I'm using GDI, I make an offscreen bitmap using <code>CreateDIBSection</code>, then get a font using <code>CreateFontIndirect</code> and render glyphs using <code>ExtTextOutW</code>.</p>
  
  <p>So far I was thinking about detecting the tofu in the rasterized form (by comparing the pixels) which sort of works but I guess it is not very nice. It also requires me to get some Unicode character that the given font for sure does not have, in order to get a "template" to compare to. I guess I would get into trouble sooner or later like that.</p>