1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 12:50:04 -04:00

Improve error message when using wrong pixels_per_point in tessellate

Closes https://github.com/emilk/egui/issues/4048
This commit is contained in:
Emil Ernerfeldt
2024-02-16 09:15:22 +01:00
parent 3672b150ed
commit 61b53ae937

View File

@@ -2115,7 +2115,8 @@ impl Context {
let texture_atlas = ctx
.fonts
.get(&pixels_per_point.into())
.expect("tessellate called before first call to Context::run()")
.expect("tessellate called with a different pixels_per_point than the font atlas was created with. \
You should use egui::FullOutput::pixels_per_point when tessellating.")
.texture_atlas();
let (font_tex_size, prepared_discs) = {
let atlas = texture_atlas.lock();