int fontList = getFontList ();
int getFontHeight () {	int fontList = getFontList ();		/* Create a font context to iterate over each element in the font list */	int [] buffer = new int [1];	if (!OS.XmFontListInitFontContext (buffer, fontList)) {		error (SWT.ERROR_NO_HANDLES);	}	int context = buffer [0];		/* Values discovering during iteration */	int height = 0;	XFontStruct fontStruct = new XFontStruct ();	int fontListEntry;	int [] fontStructPtr = new int [1];	int [] fontNamePtr = new int [1];		/* Go through each entry in the font list. */	while ((fontListEntry = OS.XmFontListNextEntry (context)) != 0) {		int fontPtr = OS.XmFontListEntryGetFont (fontListEntry, buffer);		if (buffer [0] == 0) { 			/* FontList contains a single font */			OS.memmove (fontStruct, fontPtr, XFontStruct.sizeof);			int fontAscent = Math.max (fontStruct.ascent, fontStruct.max_bounds_ascent);			int fontDescent = Math.max (fontStruct.descent, fontStruct.max_bounds_descent);			int fontHeight = fontAscent + fontDescent;			if (fontHeight > height) height = fontHeight;		} else {			/* FontList contains a fontSet */			int nFonts = OS.XFontsOfFontSet (fontPtr, fontStructPtr, fontNamePtr);			int [] fontStructs = new int [nFonts];			OS.memmove (fontStructs, fontStructPtr [0], nFonts * 4);						/* Go through each fontStruct in the font set */			for (int i=0; i<nFonts; i++) { 				OS.memmove (fontStruct, fontStructs[i], XFontStruct.sizeof);				int fontAscent = Math.max (fontStruct.ascent, fontStruct.max_bounds_ascent);				int fontDescent = Math.max (fontStruct.descent, fontStruct.max_bounds_descent);				int fontHeight = fontAscent + fontDescent;				if (fontHeight > height) height = fontHeight;			}		}	}		OS.XmFontListFreeFontContext (context);	return height;}