openFrameworks
openFrameworks copied to clipboard
Can't use OF_TTF_MONO as a font path anymore?
ofTrueTypeFont font
string p = OF_TTF_MONO;
bool b=font.load(p, 20, true, false, true);
ofLog() << (b ? "success" : "failed");
static const std::string OF_TTF_SANS = "sans-serif";
static const std::string OF_TTF_SERIF = "serif";
static const std::string OF_TTF_MONO = "monospace";
I remember using bundled OF_TTF_MONO font as a common path before in OF 0.11...
is it still possible to use it like this?
it should work. which OS are you using?
I was able to run OK on macOS
ofTrueTypeFont font;
void ofApp::setup(){
font.load(OF_TTF_MONO, 15);
}
void ofApp::draw(){
ofBackground(0);
ofSetColor(255);
font.drawString("Mono Testando 123\n129384098743021", 40, 40);
}
So it seems that it's a bug? I am on Windows 11 / Visual Studio 2022 GH master branch
Traced to two issues. one platform paths for variable path not used.
Second the string for MONO was becoming "Courier New"
In the return string this is "courier new"