MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / LoadFont

Method LoadFont

Source/OpenFrameworksPort.cpp:775–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

773}
774
775void RetinaTrueTypeFont::LoadFont(std::string path)
776{
777 mFontPath = ofToDataPath(path);
778 File file(mFontPath.c_str());
779 if (file.existsAsFile())
780 {
781 mFontHandle = nvgCreateFont(gNanoVG, path.c_str(), path.c_str());
782 mFontBoundsHandle = nvgCreateFont(gFontBoundsNanoVG, path.c_str(), path.c_str());
783 mLoaded = true;
784 }
785 else
786 {
787 mLoaded = false;
788 }
789}
790
791void RetinaTrueTypeFont::DrawString(std::string str, float size, float x, float y)
792{

Callers 1

LoadGlobalResourcesFunction · 0.80

Calls 2

ofToDataPathFunction · 0.85
nvgCreateFontFunction · 0.85

Tested by

no test coverage detected