Lower default font atlas size (#1160)

In https://github.com/emilk/egui/pull/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.
This commit is contained in:
Emil Ernerfeldt 2022-01-25 01:04:28 +01:00 committed by GitHub
parent 366f544655
commit 7ed0880b8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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]);
{