}  for(int32 i = 0; i < numFamilies; i++) {
int j = 0; for(int32 i = 0; i < numFamilies; i++) {
EnumFonts(nsIAtom* aLangGroup, const char* aGeneric, PRUint32* aCount,   PRUnichar*** aResult) {   nsString font_name;       int32 numFamilies = count_font_families();    PRUnichar** array =     (PRUnichar**) nsMemory::Alloc(numFamilies * sizeof(PRUnichar*));   if (!array) {     return NS_ERROR_OUT_OF_MEMORY;   }    for(int32 i = 0; i < numFamilies; i++) {    font_family family;     uint32 flags;     if(get_font_family(i, &family, &flags) == B_OK) {      font_name.AssignWithConversion(family);       array[i] = ToNewUnicode(font_name);     }   }    NS_QuickSort(array, numFamilies, sizeof(PRUnichar*), CompareFontNames,                nsnull);    *aCount = numFamilies;   if (*aCount) {     *aResult = array;   }   else {     nsMemory::Free(array);   }    return NS_OK; } 