Emoj with trueTypeFont in of 0.11

Hello OF community,

I’m trying to draw Emoj with the ofTrueTypeFont class.
My setup is : windows 10, vs2017, of 0.11.0
I’ve tried to use different fonts :

  • with seguiemj.ttf, the Segoe UI Emoj font on windows, it crashes when the font load the settings.

As indicated at https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/graphics/ofTrueTypeFont.cpp#L23-L75 the function

settings.addRanges(ofAlphabet::Emoji); 

is the same as

    settings.addRange(ofUnicode::range{ 0x1F601, 0x1F64F });
	settings.addRange(ofUnicode::range{ 0x2700, 0x27BF });
	settings.addRange(ofUnicode::range{ 32, 32 });
	settings.addRange(ofUnicode::range{ 0x00A9, 0x1F5FF });
	settings.addRange(ofUnicode::range{ 0x1F680, 0x1F6FF });
	settings.addRange(ofUnicode::range{ 0x24C2, 0x1F251 });
	settings.addRange(ofUnicode::range{ 0x1F30D, 0x1F567 });

If I only use settings.addRange(ofUnicode::range{ 0x1F601, 0x1F64F }); its runinng but nothing is displayed

  • with NotoEmoji-Regular.ttf, EmojiSymbols-Regular.ttf or emoji.ttf it’s the same

my code is

//--------------------------------------------------------------
void ofApp::setup(){
	ofTrueTypeFontSettings settings("seguiemj.ttf", 32);
	settings.antialiased = true;
	settings.dpi = 72;
	settings.direction = OF_TTF_LEFT_TO_RIGHT;
	settings.addRanges(ofAlphabet::Emoji);
	font.load(settings);
}

//--------------------------------------------------------------
void ofApp::draw(){
	ofSetColor(255, 255, 0);
	font.drawString("✊", 50, 200);
}

Ahhh
with u8 before the string something appears … but it’s not what I’m expecting

ofSetColor(255, 255, 255);
font.drawString(u8"😤😡 1234éà", 50, 200);

I also change the ranges of the settings

settings.addRanges(ofAlphabet::Latin);
	settings.addRange(ofUnicode::range{ 0x1F601, 0x1F64F });
	settings.addRange(ofUnicode::range{ 0x2700, 0x27BF });
	settings.addRange(ofUnicode::range{ 32, 32 });
	//settings.addRange(ofUnicode::range{ 0x00A9, 0x1F5FF });
	settings.addRange(ofUnicode::range{ 0x1F680, 0x1F6FF });
	//settings.addRange(ofUnicode::range{ 0x24C2, 0x1F251 });
	settings.addRange(ofUnicode::range{ 0x1F30D, 0x1F567 });

If I uncomment the lines commented it crashes

  • with seguiemj.ttf : letters are correct but I’ve only have the contours of the emojs
  • with emoji.ttf : nothing appears
  • with EmojiSymbols-Regular.ttf & NotoEmoji-Regular.ttf: the emoticons are white, plain, the character with accents are not correctly displayed

I also try to aadd range{ 0x1F900, 0x1F9FF } for supplemental-symbols-and-pictographs ( https://unicode-table.com/fr/#supplemental-symbols-and-pictographs ) but I still have the emoticon white. No colour.
Is there a way to have the emoticon with the correct colors ?