@kotaonaga wrote:
Hi
I am really new to oF. I tried to display emoji using ofTrueTypeFont, but the drawn emoji was not colored. it was gray. is there any way to display colored emoji?I don’t mean using ofSetColor. I wanted to use the default emoji color.
I looked at this page
my code is like this:
ofApp.h:
ofTrueTypeFont font;
ofApp.cpp:
void ofApp::setup(){ ofBackground(40); ofTrueTypeFontSettings font_settings("Apple Color Emoji.ttc", 30); font_settings.antialiased = true; font_settings.addRanges(ofAlphabet::Emoji); font.load(font_settings); } void ofApp::draw(){ font.drawString("🍣", 100, 400); }
Output:
My oF version: 0.11.0
OS I use: macOS Catalina 10.15.4(19E266)
IDE I use: Version 11.4 (11E146)Thank you.
Posts: 1
Participants: 1