nsUnicodeMappingUtil* unicodeMappingUtil = nsUnicodeMappingUtil::GetSingleton(); if (unicodeMappingUtil) { nsString*   foundFont = unicodeMappingUtil->GenericFontNameForScript( smRoman, unicodeMappingUtil->MapGenericFontNameType(aGenericFamily)); if (foundFont) { aFontFace = *foundFont; return; } }  NS_ASSERTION(0, "Failed to find a font"); aFontFace.AssignWithConversion("Times");
static void MapGenericFamilyToFont(const nsString& aGenericFamily, nsString& aFontFace){  // the CSS generic names (conversions from the old Mac Mozilla code for now)  if (aGenericFamily.EqualsIgnoreCase("serif"))  {    aFontFace.AssignWithConversion("Times");  }  else if (aGenericFamily.EqualsIgnoreCase("sans-serif"))  {    aFontFace.AssignWithConversion("Helvetica");  }  else if (aGenericFamily.EqualsIgnoreCase("cursive"))  {     aFontFace.AssignWithConversion("Apple Chancery");  }  else if (aGenericFamily.EqualsIgnoreCase("fantasy"))  {    aFontFace.AssignWithConversion("Gadget");  }  else if (aGenericFamily.EqualsIgnoreCase("monospace"))  {    aFontFace.AssignWithConversion("Courier");  }  else if (aGenericFamily.EqualsIgnoreCase("-moz-fixed"))  {    aFontFace.AssignWithConversion("Courier");  }}