gama.old
gama.old copied to clipboard
OpenGL does not display emoji 😱
Describe the bug In a Java2D display, it is possible to add emoji (as text) to display agents. But with an OpenGL display, emoji are not appearing.
To Reproduce Steps to reproduce the behavior:
- Test the following model.
model NewModel
global {
init {
create people with: [location::{50,50}];
}
}
species people {
aspect default {
draw ":-)" + "😱" + " :-)" color: #black font: font('Arial',50);
}
}
experiment name type: gui {
output {
display "My display" {
species people;
}
display "openGL" type: opengl {
species people;
}
}
}
- The java2D display displays the emoji whereas the OpenGL cannot
Screenshots

Desktop (please complete the following information):
- OS: macOS
- GAMA version:git
- Java version: 17 Temurin
The legacy TextRenderer used to use some texture rendering using Java2D, and should normally be able to display emojis (as per its doc in https://github.com/sgothel/jogl/blob/master/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java) but it does not work and I dont know why. No hint whatsoever in the forums of Jogamp. And it will not (and I can say never) work using the new TextRenderer I wrote, which uses glyphs and curves of the characters...
Let's move this issue to GAMA 2.0 then :-)