//------------------------------------------------------------------ ofTrueTypeFont::~ofTrueTypeFont(){ if (bLoadedOk){ unloadTextures(); } #if defined(TARGET_ANDROID) || defined(TARGET_OF_IOS) all_fonts().erase(this); #endif }
//------------------------------------------------------------------ ofTrueTypeFont::~ofTrueTypeFont(){ if(face) FT_Done_Face(face); if (bLoadedOk){ unloadTextures(); } #if defined(TARGET_ANDROID) all_fonts().erase(this); #endif }
//------------------------------------------------------------------ ofTrueTypeFont::ofTrueTypeFont(){ bLoadedOk = false; bMakeContours = false; #if defined(TARGET_ANDROID) || defined(TARGET_OF_IOS) all_fonts().insert(this); #endif letterSpacing = 1; spaceSize = 1; border = 1; stringQuads.setMode(OF_PRIMITIVE_TRIANGLES); binded = false; face = NULL; }
//------------------------------------------------------------------ ofTrueTypeFont::ofTrueTypeFont(){ bLoadedOk = false; bMakeContours = false; #if defined(TARGET_ANDROID) || defined(TARGET_OF_IOS) all_fonts().insert(this); #endif //cps = NULL; letterSpacing = 1; spaceSize = 1; // 3 pixel border around the glyph // We show 2 pixels of this, so that blending looks good. // 1 pixels is hidden because we don't want to see the real edge of the texture border = 3; //visibleBorder = 2; stringQuads.setMode(OF_PRIMITIVE_TRIANGLES); binded = false; }
//------------------------------------------------------------------ ofTrueTypeFont::ofTrueTypeFont(){ bLoadedOk = false; bMakeContours = false; #if defined(TARGET_ANDROID) all_fonts().insert(this); #endif letterSpacing = 1; spaceSize = 1; stringQuads.setMode(OF_PRIMITIVE_TRIANGLES); face = NULL; ascenderHeight = 0; bAntiAliased = 0; bFullCharacterSet = 0; descenderHeight = 0; dpi = 96; encoding = OF_ENCODING_UTF8; fontSize = 0; lineHeight = 0; nCharacters = 0; simplifyAmt = 0; }
void ofReloadAllFontTextures(){ set<ofTrueTypeFont*>::iterator it; for(it=all_fonts().begin();it!=all_fonts().end();it++){ (*it)->reloadTextures(); } }
void ofReloadAllFontTextures(){ for(auto font: all_fonts()){ font->reloadTextures(); } }