Browse Source

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.
pull/1166/head
Emil Ernerfeldt 3 years ago
committed by GitHub
parent
commit
7ed0880b8f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      epaint/src/text/fonts.rs

4
epaint/src/text/fonts.rs

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

Loading…
Cancel
Save