nsFontSearch* search = (nsFontSearch*) aClosure; if (!search->mFont) { char* value = nsnull; gPref->CopyCharPref(aName, &value); nsAutoString name; if (value) { name.AssignWithConversion(value); nsAllocator::Free(value); value = nsnull; FindFamily(search, &name); } if (!search->mFont) { gPref->CopyDefaultCharPref(aName, &value); if (value) { name.AssignWithConversion(value); nsAllocator::Free(value); value = nsnull; FindFamily(search, &name); } }
nsFontSearch* s = (nsFontSearch*) aClosure; if (s->mFont && s->mFont->SupportsChar(s->mChar)) { return; } char* value = nsnull; gPref->CopyCharPref(aName, &value); nsCAutoString name; if (value) { name = value; nsAllocator::Free(value); value = nsnull; s->mFont = s->mMetrics->TryNode(&name, s->mChar); } if (s->mFont && s->mFont->SupportsChar(s->mChar)) { return; } gPref->CopyDefaultCharPref(aName, &value); if (value) { name = value; nsAllocator::Free(value); value = nsnull; s->mFont = s->mMetrics->TryNode(&name, s->mChar);
PrefEnumCallback(const char* aName, void* aClosure){  nsFontSearch* search = (nsFontSearch*) aClosure;  if (!search->mFont) {    char* value = nsnull;    gPref->CopyCharPref(aName, &value);    nsAutoString name;    if (value) {      name.AssignWithConversion(value);      nsAllocator::Free(value);      value = nsnull;      FindFamily(search, &name);    }    if (!search->mFont) {      gPref->CopyDefaultCharPref(aName, &value);      if (value) {        name.AssignWithConversion(value);        nsAllocator::Free(value);        value = nsnull;        FindFamily(search, &name);      }    }  }}