How to remove Character info in the CharacterList?


I’m using FontCache like creating Character info if it is not present in the CharacterList while using Runtime Font.

It seems that removing Character info in the Characterlist

,But if I play game a long time, The memory will be filled up.

Are there any way to remove Character info in the CharacterList which was not used for a while?

We don’t currently have a way to flush data out of the character lists, as the bulk of the data for a character is stored in the font cache itself (inside the font atlas texture), and these are automatically flushed out once the font cache gets too large (grows larger than a single font atlas texture page).

You can manually flush the font cache if you know you’re transitioning from a state where a lot of text was being used:


Alternatively, you can lower the size of a font atlas page (the default is 1024x1024) which will make the font cache flush more frequently (however don’t make it too small as flushing the font cache can be expensive). This is controlled by the config system:


You can see the current state of your font cache at any point by running the FontAtlasVisualizer command from the in-game console.


We think this post contains useful information which we would like to share with our public UE4 community. With your approval, we would like to make a copy of this post on the public AnswerHub which includes the discussion but strips out your username and company name. Please let us know if you are okay with this.


Please Share!