gama.old icon indicating copy to clipboard operation
gama.old copied to clipboard

OpenGL does not display emoji 😱

Open benoitgaudou opened this issue 3 years ago • 2 comments
trafficstars

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:

  1. 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;
		}		
	}
}
  1. The java2D display displays the emoji whereas the OpenGL cannot

Screenshots Screenshot 2022-04-29 at 16 54 43

Desktop (please complete the following information):

  • OS: macOS
  • GAMA version:git
  • Java version: 17 Temurin

benoitgaudou avatar Apr 29 '22 09:04 benoitgaudou

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...

AlexisDrogoul avatar May 05 '22 09:05 AlexisDrogoul

Let's move this issue to GAMA 2.0 then :-)

benoitgaudou avatar May 05 '22 10:05 benoitgaudou