From 863e6cb07d48d40afb2d6659cd108909e76ea06d Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 1 Oct 2021 19:25:15 +0200 Subject: [PATCH] expose egui::TextFormat --- egui/src/lib.rs | 9 +++++---- egui_demo_lib/src/apps/demo/misc_demo_window.rs | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/egui/src/lib.rs b/egui/src/lib.rs index 3b6e1fa89..ce5442354 100644 --- a/egui/src/lib.rs +++ b/egui/src/lib.rs @@ -375,6 +375,10 @@ pub use epaint::{ ClippedMesh, Color32, Rgba, Shape, Stroke, Texture, TextureId, }; +pub mod text { + pub use epaint::text::{Fonts, Galley, LayoutJob, LayoutSection, TextFormat, TAB_SIZE}; +} + pub use { containers::*, context::{Context, CtxRef}, @@ -392,14 +396,11 @@ pub use { response::{InnerResponse, Response}, sense::Sense, style::{Style, Visuals}, + text::{Galley, TextFormat}, ui::Ui, widgets::*, }; -pub mod text { - pub use epaint::text::{Fonts, Galley, LayoutJob, LayoutSection, TextFormat, TAB_SIZE}; -} - // ---------------------------------------------------------------------------- /// Helper function that adds a label when compiling with debug assertions enabled. diff --git a/egui_demo_lib/src/apps/demo/misc_demo_window.rs b/egui_demo_lib/src/apps/demo/misc_demo_window.rs index 31b03d0e6..b55a6e445 100644 --- a/egui_demo_lib/src/apps/demo/misc_demo_window.rs +++ b/egui_demo_lib/src/apps/demo/misc_demo_window.rs @@ -401,7 +401,7 @@ impl SubTree { // ---------------------------------------------------------------------------- fn text_layout_ui(ui: &mut egui::Ui) { - use egui::epaint::text::{LayoutJob, TextFormat}; + use egui::text::LayoutJob; let mut job = LayoutJob::default();