Project: SWT
Bug 73432 Textlayout does not render multiline text correctly
Reported: 2004-09-08 05:37:50 | Status: resolved fixed

When I run code with the following snippet, the first time when Chinese characters appears, TextLayout renders that line very well. However for the subsequent lines, Textlayout just shows boxes. It is not a font problem, Textlayout can show the first line perfectly. All the characters in the subsequent lines are just repition of the first line. ////////////////////// The code ///////////////////////// TextLayout layout = new TextLayout(Display.getCurrent()); layout.setWidth(200); layout.setText("This is a test.This is a test.This is \u65E5 \u672C\u8A9E\u65E5\u672C\u8A9E\u65E5\u672C\u8A9E\u65E5 \u672C\u8A9E\u672C\u8A9E\u65E5\u672C\u672C\u8A9E\u65E5\u672C\u672C\u8A9E\u65E5 \u672Ca test.This is a test.This\n is a test."); layout.draw(gc, 10, 10);

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java