diff --git a/crates/epaint/src/text/fonts.rs b/crates/epaint/src/text/fonts.rs index 685bdf9b8a8..3cb8e854d9c 100644 --- a/crates/epaint/src/text/fonts.rs +++ b/crates/epaint/src/text/fonts.rs @@ -633,7 +633,7 @@ impl FontsImpl { "pixels_per_point out of range: {pixels_per_point}" ); - let texture_width = max_texture_side.at_most(8 * 1024); + let texture_width = max_texture_side.at_most(16 * 1024); let initial_height = 32; // Keep initial font atlas small, so it is fast to upload to GPU. This will expand as needed anyways. let atlas = TextureAtlas::new([texture_width, initial_height]); diff --git a/crates/epaint/src/texture_atlas.rs b/crates/epaint/src/texture_atlas.rs index b0f0ad03881..7ea76f8722d 100644 --- a/crates/epaint/src/texture_atlas.rs +++ b/crates/epaint/src/texture_atlas.rs @@ -159,8 +159,8 @@ impl TextureAtlas { } fn max_height(&self) -> usize { - // the initial width is likely the max texture side size - self.image.width() + // the initial width is set to the max size + self.image.height().max(self.image.width()) } /// When this get high, it might be time to clear and start over!