Font newFont = getSystemFont (); Shell [] shells = getShells (); for (int i=0; i<shells.length; i++) { Shell shell = shells [i]; if (!shell.isDisposed ()) { shell.updateFont (oldFont, newFont); } }
void updateFonts () {	if (OS.IsWinCE) return;	Font oldFont = getSystemFont ();	int systemFont = 0;	NONCLIENTMETRICS info = OS.IsUnicode ? (NONCLIENTMETRICS) new NONCLIENTMETRICSW () : new NONCLIENTMETRICSA ();	info.cbSize = NONCLIENTMETRICS.sizeof;	if (OS.SystemParametersInfo (OS.SPI_GETNONCLIENTMETRICS, 0, info, 0)) {		systemFont = OS.CreateFontIndirect (OS.IsUnicode ? (LOGFONT) ((NONCLIENTMETRICSW)info).lfMessageFont : ((NONCLIENTMETRICSA)info).lfMessageFont);	}	if (systemFont == 0) systemFont = OS.GetStockObject (OS.DEFAULT_GUI_FONT);	if (systemFont == 0) systemFont = OS.GetStockObject (OS.SYSTEM_FONT);	if (systemFont == 0) return;	int length = systemFonts == null ? 0 : systemFonts.length;	int [] newFonts = new int [length + 1];	if (systemFonts != null) {		System.arraycopy (systemFonts, 0, newFonts, 0, length);	}	newFonts [length] = systemFont;	systemFonts = newFonts;	Font newFont = getSystemFont ();	Shell [] shells = getShells ();	for (int i=0; i<shells.length; i++) {		Shell shell = shells [i];		if (!shell.isDisposed ()) {			shell.updateFont (oldFont, newFont);		}	}}