From 7ed0880b8f26e2f2766f572baded08d12837b1df Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Tue, 25 Jan 2022 01:04:28 +0100 Subject: [PATCH] Lower default font atlas size (#1160) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- epaint/src/text/fonts.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epaint/src/text/fonts.rs b/epaint/src/text/fonts.rs index 6ca3eb41..bd6a9e2b 100644 --- a/epaint/src/text/fonts.rs +++ b/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]); {