font.dispose();
void calculateLineHeight() {	GC gc = getGC();	Font originalFont = gc.getFont();	FontData[] fontData = originalFont.getFontData();	Font font;		lineHeight = gc.getFontMetrics().getHeight();		lineEndSpaceWidth = gc.stringExtent(" ").x;	// don't assume that bold and normal fonts have the same height	// fixes bug 41773	for (int i = 0; i < fontData.length; i++) {		int fontStyle = fontData[i].getStyle(); 		if ((fontStyle & SWT.BOLD) == SWT.BOLD) {			fontData[i].setStyle(fontStyle ^ SWT.BOLD);		} else {			fontData[i].setStyle(fontStyle | SWT.BOLD);		} 	}	font = new Font(getDevice(), fontData);	gc.setFont(font);	lineHeight = Math.max(lineHeight, gc.getFontMetrics().getHeight());	gc.setFont(originalFont);	font.dispose();		disposeGC(gc);}