Community
Participate
Working Groups
HEAD, Windows 7 64-bit, using 32-bit JDK/SWT Run the snippet below. I'd expect the two widgets to look similar, but the StyledText has problems with rendering the snowman (\u2603) correctly in all places. With most fonts I tried, the snowman after "abc" is rendered as a question mark in a box. Only looks OK with the "Tahoma" font. With "Segoe UI", all occurrences are rendered as snowmen, but with different shapes. This problem only happens with certain characters. Other examples are \u266d and \u2602. I first thought bug 170466 has returned, but the example from there still looks fine. package snippets; import org.eclipse.swt.*; import org.eclipse.swt.custom.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class Snowman { private static final String STR= "key1\u2603=abc\u2603, \u2603=,"; public static void main(String[] args) { Display display= new Display(); Shell shell= new Shell(display); shell.setLayout(new GridLayout()); Font font= new Font(display, "Consolas", 20, SWT.NORMAL); Text text= new Text(shell, SWT.SINGLE); text.setText(STR); text.setFont(font); StyledText styledText= new StyledText(shell, SWT.SINGLE); styledText.setText(STR); styledText.setFont(font); styledText.setLeftMargin(-text.computeTrim(0, 0, 0, 0).x); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); System.out.println(); } }
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.