`gpui_web` currently embeds IBM Plex Sans and Lilex into every browser application during platform construction. Applications such as Delta already provide their own fonts, so those binaries contain overlapping font bundles and register the same faces twice. This change starts the web platform with an empty font database, matching the ownership boundary used by native applications: the application selects and registers its fonts before opening a window. Delta already follows that sequence. GPUI's browser-capable examples now load the former eight-face bundle explicitly through shared example support, while the standalone `hello_web` example demonstrates registering a minimal application font directly. Testing performed: - `cargo check -p gpui --examples --target wasm32-unknown-unknown` - `cargo check -p gpui --examples` - `cargo check -p gpui_web --target wasm32-unknown-unknown` - `cargo check --manifest-path crates/gpui_web/examples/hello_web/Cargo.toml --target wasm32-unknown-unknown` - `./script/clippy -p gpui_web --target wasm32-unknown-unknown` - `cargo fmt -p gpui -p gpui_web --check` Release Notes: - N/A
18 lines
331 B
TOML
18 lines
331 B
TOML
[workspace]
|
|
|
|
[package]
|
|
name = "hello_web"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
publish = false
|
|
|
|
[[bin]]
|
|
name = "hello_web"
|
|
path = "main.rs"
|
|
|
|
[dependencies]
|
|
gpui = { path = "../../../gpui" }
|
|
gpui_platform = { path = "../../../gpui_platform" }
|
|
web-sys = { version = "0.3", features = ["console", "Location", "Window"] }
|
|
web-time = "1"
|