LabelBMF on button instead regular Label

I want to use BMF not only for labels but also for buttons to get better performance. How can I do that?

Are you currently using a LabelTTF?

Actually yes

Is there a reason you can’t just replace createWithTTF() with createWithBMFont() and adjust your font file accordingly? I’m just trying to visualize what you are doing and having trouble doing. Or perhaps also post some code of your current button and label and I can look at…

It used to be like that but game took a bit too long load. As far as I know BMF are much faster than TTF (at least that’s how it was in 2.x). Also I would like to have an outline and shadow on every text and seems pointless to addShadow and outline to TTF. Not only it will take more time to load but also the code is more ugly.

Yes, They are faster.

Is there a converter that would convert BMF to regular ttf file?

Am I misunderstanding? I thought you wanted to go from TTF to BMF? But you asked for a converter to go BMF to TTF…

In any case, GlyphDesigner is amazing and well worth the cost. https://71squared.com/en/glyphdesigner It looks like currently they are having a 50% off sale if you use the coupon code they provide.

I’m not sure of anything free, but I really haven’t looked.

Yes I used it to generate BMF with shadows and outlines. I would like to make font file from them and use them as TTF without making shadows outlines etc manually in code. Btw I did some testing and it turned out that TTF is a bit faster when no modifications are applied. Running this code it took them the same time but ttf was added a shadow:

  for (int i = 0; i < 5000; i++)
	{
		CCLOG("creating %d ", i);
		//auto lbl = Label::create("SOMETHING", "Aleo-BoldItalic.ttf",12);
		//lbl->enableShadow();
		auto lbl = Label::createWithBMFont("aleoBoldItalic.fnt", "SOMETHING");
		this->addChild(lbl);
	}