Skip to content

Commit

Permalink
Lower default font atlas size
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
emilk committed Jan 24, 2022
1 parent 366f544 commit 2182ca6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions epaint/src/text/fonts.rs
Expand Up @@ -478,8 +478,8 @@ impl FontsImpl {
pixels_per_point
);

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

{
Expand Down

0 comments on commit 2182ca6

Please sign in to comment.