Skip to content

Commit 7ed0880

Browse files
authored
Lower default font atlas size (#1160)
In #1154 the default was set to 16k x 512, which is way excessive, as most of it will be blank. This PR changes it to 8k x 64, which will make egui use less RAM and VRAM, and load quicker again. This also decreases the max size from 16k² to 8k². That should be enough.
1 parent 366f544 commit 7ed0880

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

epaint/src/text/fonts.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,8 @@ impl FontsImpl {
478478
pixels_per_point
479479
);
480480

481-
let texture_width = max_texture_side.at_most(16 * 1024);
482-
let initial_height = 512;
481+
let texture_width = max_texture_side.at_most(8 * 1024);
482+
let initial_height = 64;
483483
let mut atlas = TextureAtlas::new([texture_width, initial_height]);
484484

485485
{

0 commit comments

Comments
 (0)