mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Remove log feature (#7583)
This commit is contained in:
@@ -44,9 +44,6 @@ color-hex = ["ecolor/color-hex"]
|
||||
## If you plan on specifying your own fonts you may disable this feature.
|
||||
default_fonts = ["epaint_default_fonts"]
|
||||
|
||||
## Turn on the `log` feature, that makes egui log some errors using the [`log`](https://docs.rs/log) crate.
|
||||
log = ["dep:log"]
|
||||
|
||||
## [`mint`](https://docs.rs/mint) enables interoperability with other math libraries such as [`glam`](https://docs.rs/glam) and [`nalgebra`](https://docs.rs/nalgebra).
|
||||
mint = ["emath/mint"]
|
||||
|
||||
@@ -71,6 +68,7 @@ ecolor.workspace = true
|
||||
|
||||
ab_glyph = "0.2.11"
|
||||
ahash.workspace = true
|
||||
log.workspace = true
|
||||
nohash-hasher.workspace = true
|
||||
parking_lot.workspace = true # Using parking_lot over std::sync::Mutex gives 50% speedups in some real-world scenarios.
|
||||
profiling = { workspace = true}
|
||||
@@ -81,7 +79,6 @@ bytemuck = { workspace = true, optional = true, features = ["derive"] }
|
||||
## Enable this when generating docs.
|
||||
document-features = { workspace = true, optional = true }
|
||||
|
||||
log = { workspace = true, optional = true }
|
||||
rayon = { version = "1.7", optional = true }
|
||||
|
||||
## Allow serialization using [`serde`](https://docs.rs/serde) .
|
||||
|
||||
@@ -2000,12 +2000,10 @@ impl Tessellator {
|
||||
}
|
||||
|
||||
if galley.pixels_per_point != self.pixels_per_point {
|
||||
let warn = "epaint: WARNING: pixels_per_point (dpi scale) have changed between text layout and tessellation. \
|
||||
You must recreate your text shapes if pixels_per_point changes.";
|
||||
#[cfg(feature = "log")]
|
||||
log::warn!("{warn}");
|
||||
#[cfg(not(feature = "log"))]
|
||||
println!("{warn}");
|
||||
log::warn!(
|
||||
"epaint: WARNING: pixels_per_point (dpi scale) have changed between text layout and tessellation. \
|
||||
You must recreate your text shapes if pixels_per_point changes."
|
||||
);
|
||||
}
|
||||
|
||||
out.vertices.reserve(galley.num_vertices);
|
||||
|
||||
@@ -463,7 +463,6 @@ impl CachedFamily {
|
||||
.glyph_info_no_cache_or_fallback(PRIMARY_REPLACEMENT_CHAR, fonts_by_id)
|
||||
.or_else(|| slf.glyph_info_no_cache_or_fallback(FALLBACK_REPLACEMENT_CHAR, fonts_by_id))
|
||||
.unwrap_or_else(|| {
|
||||
#[cfg(feature = "log")]
|
||||
log::warn!(
|
||||
"Failed to find replacement characters {PRIMARY_REPLACEMENT_CHAR:?} or {FALLBACK_REPLACEMENT_CHAR:?}. Will use empty glyph."
|
||||
);
|
||||
|
||||
@@ -238,7 +238,6 @@ impl TextureAtlas {
|
||||
if required_height > self.max_height() {
|
||||
// This is a bad place to be - we need to start reusing space :/
|
||||
|
||||
#[cfg(feature = "log")]
|
||||
log::warn!("epaint texture atlas overflowed!");
|
||||
|
||||
self.cursor = (0, self.image.height() / 3); // Restart a bit down - the top of the atlas has too many important things in it
|
||||
|
||||
Reference in New Issue
Block a user