font->signature = ((NEWTEXTMETRICEX*) metrics)->ntmFontSig;
static int CALLBACK enumProc(const LOGFONT* logFont, const TEXTMETRIC* metrics,  DWORD fontType, LPARAM closure){  // XXX do we really want to ignore non-TrueType fonts?  if (!(fontType & TRUETYPE_FONTTYPE)) {    //printf("rejecting %s\n", logFont->lfFaceName);    return 1;  }  // XXX ignore vertical fonts  if (logFont->lfFaceName[0] == '@') {    return 1;  }  // XXX make this smarter: don't add font to list if we already have a font  // with the same font signature -- erik  if (nsFontMetricsWin::gGlobalFontsCount == gGlobalFontsAlloc) {    int newSize = 2 * (gGlobalFontsAlloc ? gGlobalFontsAlloc : 1);    nsGlobalFont* newPointer = (nsGlobalFont*)      PR_Realloc(nsFontMetricsWin::gGlobalFonts, newSize*sizeof(nsGlobalFont));    if (newPointer) {      nsFontMetricsWin::gGlobalFonts = newPointer;      gGlobalFontsAlloc = newSize;    }    else {      return 0;    }  }  nsGlobalFont* font =    &nsFontMetricsWin::gGlobalFonts[nsFontMetricsWin::gGlobalFontsCount++];  PRUnichar name[LF_FACESIZE];  name[0] = 0;  MultiByteToWideChar(CP_ACP, 0, logFont->lfFaceName,    strlen(logFont->lfFaceName) + 1, name, sizeof(name)/sizeof(name[0]));  font->name = new nsString(name);  if (!font->name) {    nsFontMetricsWin::gGlobalFontsCount--;    return 0;  }  font->map = nsnull;  font->logFont = *logFont;  font->skip = 0;  return 1;}