Open yaustar opened 3 years ago
Is that different from destroying and recreating the canvas font? There is already a destroy function.
The CanvasFont
API needs a full overhaul, TBH. The current API is 'not good' IMHO.
I guess the could destroy and create a new canvas font object but that would mean reassigning the new font object to all the text elements which is what I think the client wants to avoid doing.
Add a 'reset' to canvas font so that it removes the current 'cache' of characters and textures to keep VRAM usage low.
During a long session, there may be an accumulation of textures that could be cleared out.