Community
Participate
Working Groups
Specifying a font for a TableItem leads to continuous rendering of this font. In TableItemLCA#preserveValues, we preserve the Font object of this TableItem but in TableItemLCA#writeFont we compare it with the CSS syntax and not the real font object.
Snippet to reproduce: Display display = new Display(); Shell shell = new Shell( display ); shell.setLayout( new GridLayout( 1, false ) ); Table table = new Table( shell, SWT.SINGLE | SWT.FULL_SELECTION ); table.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) ); table.setLinesVisible( true ); table.setHeaderVisible( true ); for( int i = 0; i < 10; i++ ) { TableItem tableItem = new TableItem( table, SWT.NONE ); tableItem.setText( 0, "foo" ); tableItem.setFont( new Font( display, "Arial", 10, SWT.BOLD ) ); } shell.pack(); shell.open(); while( !shell.isDisposed() ) { if( !display.readAndDispatch() ) display.sleep(); } display.dispose(); return 0;
Fixed in CVS HEAD.