1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

Expand max font atlas size from 8k to 16k (#5257)

When using fonts with an average of 50,000 characters,
'epaint texture atlas overflowed!' may be printed and cause problems.
It is necessary to expand the max value related to texture.

* Closes #5256

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
rustbasic
2024-10-29 18:42:28 +09:00
committed by GitHub
parent 68352fc13e
commit 288c74e332
2 changed files with 3 additions and 3 deletions

View File

@@ -159,8 +159,8 @@ impl TextureAtlas {
}
fn max_height(&self) -> usize {
// the initial width is likely the max texture side size
self.image.width()
// the initial width is set to the max size
self.image.height().max(self.image.width())
}
/// When this get high, it might be time to clear and start over!