Open saki7 opened 8 years ago
ofTrueTypeFont
has a atlas texture texAtlas
and loads all ASCII chars at once in load()
.
While on the other hand, ofxTrueTypeFontUC
cannot load all chars in advance.
So, ofxTrueTypeFontUC
allocates a texture to each char called.
Large scale modification will be needed to provide getStringMesh()
, I think.
I'm afraid it is.
I have my project drawing widgets around 1 to 100 and the FPS will drop from 90~ to 30~ due to the drawString()
. Caching a string mesh would be a very nice feature...
I think so, too. But there is no plan to provide the caching mesh feature to ofxTrueTypeFontUC
in the near future. (I'm thinking that I want to make another typography class...)
By the way, in ofxTrueTypeFontUC
,drawStringAsShapes()
is more faster than drawString()
in some cases. For your information.
Another typography class, huh? Sounds great! Looking forward to seeing that in progress.
I'll check drawStringAsShapes()
and see if it works.
ofTrueTypeFont
provides these two functions for caching string in draw phase:So is there any way to provide this in
ofxTrueTypeFontUC
? I know it's a bit tricky since the texture inofxTrueTypeFontUC
is divided into each chars, but inofTrueTypeFont
, is not (which is concatenated, I think).