Describe the bug
On Windows when GC.setAdvanced(true) an emoji is displayed as a square box.
To Reproduce
Run the Snippet below. Set e.gc.setAdvanced(false); to see the emoji.
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class EmojiTest {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setText("SWT Test");
shell.setLayout(new FillLayout());
shell.setSize(300, 250);
shell.setBackground(new Color(255, 255, 255));
String emoji = Character.toString(0x1F600);
shell.addPaintListener(e -> {
e.gc.setAdvanced(true);
e.gc.drawText("Hello World " + emoji, 20, 50);
});
shell.open();
while(!shell.isDisposed()) {
if(!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
Expected behavior
Should see the emoji when advanced mode is true
Screenshots
With advanced mode false:
With advanced mode true:
Environment:
- Select the platform(s) on which the behavior is seen:
- Additional OS info (e.g. OS version, Linux Desktop, etc)
Windows 11
Java 21
Describe the bug
On Windows when
GC.setAdvanced(true)an emoji is displayed as a square box.To Reproduce
Run the Snippet below. Set
e.gc.setAdvanced(false);to see the emoji.Expected behavior
Should see the emoji when advanced mode is true
Screenshots
With advanced mode false:
With advanced mode true:
Environment:
Windows 11
Java 21