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

Remove dependency on tts (#3651)

We were using [`tts`](https://github.com/ndarilek/tts-rs) for the
web-only screen reader. This was overkill, to say the least. It is now
replaced with ten lines of `web-sys` calls.
This commit is contained in:
Emil Ernerfeldt
2023-11-28 10:46:18 +01:00
committed by GitHub
parent 8494cf854c
commit a1f3c71b7f
9 changed files with 29 additions and 303 deletions

View File

@@ -32,6 +32,7 @@ default = [
"default_fonts",
"glow",
"wayland",
"web_screen_reader",
"winit/default",
"x11",
]
@@ -84,7 +85,10 @@ wayland = ["egui-winit/wayland"]
## Enable screen reader support (requires `ctx.options_mut(|o| o.screen_reader = true);`) on web.
##
## For other platforms, use the `accesskit` feature instead.
web_screen_reader = ["tts"]
web_screen_reader = [
"web-sys/SpeechSynthesis",
"web-sys/SpeechSynthesisUtterance",
]
## Use [`wgpu`](https://docs.rs/wgpu) for painting (via [`egui-wgpu`](https://github.com/emilk/egui/tree/master/crates/egui-wgpu)).
## This overrides the `glow` feature.
@@ -207,5 +211,4 @@ web-sys = { version = "0.3.58", features = [
# optional web:
egui-wgpu = { version = "0.24.0", path = "../egui-wgpu", optional = true } # if wgpu is used, use it without (!) winit
raw-window-handle = { workspace = true, optional = true }
tts = { version = "0.25", optional = true, default-features = false }
wgpu = { workspace = true, optional = true }