From b30cb3313aaa2bb6b0a2bae5fddd7dcd4061beca Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Wed, 7 Apr 2021 20:14:44 +0200 Subject: [PATCH] Try to allow turning off default_fonts for all libs (#266) --- eframe/Cargo.toml | 12 ++++++++---- egui_demo_lib/Cargo.toml | 2 +- egui_glium/Cargo.toml | 8 ++++++-- egui_web/Cargo.toml | 8 ++++++-- epi/Cargo.toml | 2 +- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/eframe/Cargo.toml b/eframe/Cargo.toml index caa24300..25278a12 100644 --- a/eframe/Cargo.toml +++ b/eframe/Cargo.toml @@ -20,19 +20,23 @@ include = [ [lib] [dependencies] -egui = { version = "0.11.0", path = "../egui" } +egui = { version = "0.11.0", path = "../egui", default-features = false } epi = { version = "0.11.0", path = "../epi" } # For compiling natively: [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -egui_glium = { version = "0.11.0", path = "../egui_glium" } +egui_glium = { version = "0.11.0", path = "../egui_glium", default-features = false } # For compiling to web: [target.'cfg(target_arch = "wasm32")'.dependencies] -egui_web = { version = "0.11.0", path = "../egui_web" } +egui_web = { version = "0.11.0", path = "../egui_web", default-features = false } [features] -default = [] +default = ["default_fonts"] + +# If set, egui will use `include_bytes!` to bundle some fonts. +# If you plan on specifying your own fonts you may disable this feature. +default_fonts = ["egui/default_fonts"] http = ["egui_glium/http", "egui_web/http"] persistence = ["epi/persistence", "egui_glium/persistence", "egui_web/persistence"] screen_reader = ["egui_glium/screen_reader", "egui_web/screen_reader"] # experimental diff --git a/egui_demo_lib/Cargo.toml b/egui_demo_lib/Cargo.toml index acb53425..60ab1a84 100644 --- a/egui_demo_lib/Cargo.toml +++ b/egui_demo_lib/Cargo.toml @@ -20,7 +20,7 @@ include = [ [lib] [dependencies] -egui = { version = "0.11.0", path = "../egui" } +egui = { version = "0.11.0", path = "../egui", default-features = false } epi = { version = "0.11.0", path = "../epi" } # feature "http": diff --git a/egui_glium/Cargo.toml b/egui_glium/Cargo.toml index 5e859b4f..f8f81a43 100644 --- a/egui_glium/Cargo.toml +++ b/egui_glium/Cargo.toml @@ -20,7 +20,7 @@ include = [ [dependencies] copypasta = "0.7" -egui = { version = "0.11.0", path = "../egui" } +egui = { version = "0.11.0", path = "../egui", default-features = false, features = ["single_threaded"] } epi = { version = "0.11.0", path = "../epi" } glium = "0.29" webbrowser = "0.5" @@ -40,7 +40,11 @@ tts = { version = "0.15", optional = true } chrono = { version = "0.4", optional = true } [features] -default = [] +default = ["default_fonts"] + +# If set, egui will use `include_bytes!` to bundle some fonts. +# If you plan on specifying your own fonts you may disable this feature. +default_fonts = ["egui/default_fonts"] http = ["ureq"] persistence = [ "directories-next", diff --git a/egui_web/Cargo.toml b/egui_web/Cargo.toml index 17a11c08..77be3e66 100644 --- a/egui_web/Cargo.toml +++ b/egui_web/Cargo.toml @@ -22,7 +22,7 @@ include = [ crate-type = ["cdylib", "rlib"] [dependencies] -egui = { version = "0.11.0", path = "../egui" } +egui = { version = "0.11.0", path = "../egui", default-features = false, features = ["single_threaded"] } epi = { version = "0.11.0", path = "../epi" } js-sys = "0.3" ron = { version = "0.6", optional = true } @@ -32,7 +32,11 @@ wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" [features] -default = [] +default = ["default_fonts"] + +# If set, egui will use `include_bytes!` to bundle some fonts. +# If you plan on specifying your own fonts you may disable this feature. +default_fonts = ["egui/default_fonts"] http = [ "epi/http", "web-sys/Headers", diff --git a/epi/Cargo.toml b/epi/Cargo.toml index 62b46fd6..90d81bf5 100644 --- a/epi/Cargo.toml +++ b/epi/Cargo.toml @@ -20,7 +20,7 @@ include = [ [lib] [dependencies] -egui = { version = "0.11.0", path = "../egui" } +egui = { version = "0.11.0", path = "../egui", default-features = false } ron = { version = "0.6", optional = true } serde = { version = "1", optional = true }