Пример #1
0
//------------------------------------------------------------------
ofTrueTypeFont::~ofTrueTypeFont(){

	if (bLoadedOk){
		unloadTextures();
	}

	#if defined(TARGET_ANDROID) || defined(TARGET_OF_IOS)
		all_fonts().erase(this);
	#endif
}
Пример #2
0
//------------------------------------------------------------------
ofTrueTypeFont::~ofTrueTypeFont(){

	if(face) FT_Done_Face(face);

	if (bLoadedOk){
		unloadTextures();
	}

	#if defined(TARGET_ANDROID)
		all_fonts().erase(this);
	#endif
}
Пример #3
0
//------------------------------------------------------------------
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;
}
Пример #4
0
//------------------------------------------------------------------
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;
}
Пример #5
0
//------------------------------------------------------------------
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;
}
Пример #6
0
	void ofReloadAllFontTextures(){
		set<ofTrueTypeFont*>::iterator it;
		for(it=all_fonts().begin();it!=all_fonts().end();it++){
			(*it)->reloadTextures();
		}
	}
Пример #7
0
	void ofReloadAllFontTextures(){
		for(auto font: all_fonts()){
			font->reloadTextures();
		}
	}