-
Notifications
You must be signed in to change notification settings - Fork 20
Parley work #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parley work #130
Conversation
7f4226c
to
689c04f
Compare
abe10a4
to
b5b0c69
Compare
adds default font plugin as the logic has to be a bit more intricate
91bf3e0
to
9ac5ec5
Compare
65300b6
to
2618301
Compare
PR is a bit on hold, currently investigating performance issues with font rendering. |
Ok, resuming work on this and hope that the future hybrid renderer works better with font rendering. |
d772388
to
1cc4688
Compare
I'm unable to run the Panic originates from here: https://github.com/dfrg/swash/blob/af00b06d9045af8c853eabf3b9eb8b6aed8610c1/src/shape/at.rs#L572 2025-03-25T13:16:33.900863Z INFO bevy_render::renderer: AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
Initialising in parallel using 8 threads
2025-03-25T13:16:34.325168Z INFO bevy_winit::system: Creating new window "App" (0v1#4294967296)
2025-03-25 09:16:34.531 text[11025:13778357] +[IMKClient subclass]: chose IMKClient_Modern
2025-03-25 09:16:34.531 text[11025:13778357] +[IMKInputSession subclass]: chose IMKInputSession_Modern
thread 'Compute Task Pool (2)' panicked at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/swash-0.2.1/src/shape/at.rs:572:25:
attempt to subtract with overflow
stack backtrace:
0: rust_begin_unwind
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:692:5
1: core::panicking::panic_fmt
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/panicking.rs:75:14
2: core::panicking::panic_const::panic_const_sub_overflow
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/panicking.rs:178:21
3: swash::shape::at::CoverageBuilder::finish
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/swash-0.2.1/src/shape/at.rs:572:25
4: swash::shape::at::FeatureStoreBuilder::build_stage
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/swash-0.2.1/src/shape/at.rs:482:39
5: swash::shape::at::FeatureStoreBuilder::build
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/swash-0.2.1/src/shape/at.rs:389:13
6: swash::shape::engine::Engine::collect_features
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/swash-0.2.1/src/shape/engine.rs:109:9
7: swash::shape::ShaperBuilder::build
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/swash-0.2.1/src/shape/mod.rs:539:21
8: swash::shape::partition::shape_clusters
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/swash-0.2.1/src/shape/partition.rs:219:22
9: swash::shape::partition::shape
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/swash-0.2.1/src/shape/partition.rs:186:15
10: parley::shape::shape_text
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parley-0.3.0/src/shape.rs:110:13
11: parley::builder::build_into_layout
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parley-0.3.0/src/builder.rs:172:9
12: parley::builder::RangedBuilder<B>::build_into
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parley-0.3.0/src/builder.rs:55:9
13: parley::builder::RangedBuilder<B>::build
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parley-0.3.0/src/builder.rs:60:9
14: bevy_vello::text::font::VelloFont::render::{{closure}}::{{closure}}
at ./src/text/font.rs:99:34
15: std::thread::local::LocalKey<core::cell::RefCell<T>>::with_borrow_mut::{{closure}}
at /Users/simbleau/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:529:26
16: std::thread::local::LocalKey<T>::try_with
at /Users/simbleau/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:308:12
17: std::thread::local::LocalKey<T>::with
at /Users/simbleau/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:272:9
18: std::thread::local::LocalKey<core::cell::RefCell<T>>::with_borrow_mut
at /Users/simbleau/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:529:14
19: bevy_vello::text::font::VelloFont::render::{{closure}}
at ./src/text/font.rs:88:13
20: std::thread::local::LocalKey<core::cell::RefCell<T>>::with_borrow_mut::{{closure}}
at /Users/simbleau/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:529:26
21: std::thread::local::LocalKey<T>::try_with
at /Users/simbleau/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:308:12
22: std::thread::local::LocalKey<T>::with
at /Users/simbleau/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:272:9
23: std::thread::local::LocalKey<core::cell::RefCell<T>>::with_borrow_mut
at /Users/simbleau/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:529:14
24: bevy_vello::text::font::VelloFont::render
at ./src/text/font.rs:81:9
25: bevy_vello::render::systems::render_frame
at ./src/render/systems.rs:212:21
26: core::ops::function::FnMut::call_mut
at /Users/simbleau/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:166:5
27: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
at /Users/simbleau/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:294:13
28: <Func as bevy_ecs::system::function_system::SystemParamFunction<fn(F0,F1,F2,F3,F4,F5,F6,F7,F8) .> Out>>::run::call_inner
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_ecs-0.15.3/src/system/function_system.rs:1002:21
29: <Func as bevy_ecs::system::function_system::SystemParamFunction<fn(F0,F1,F2,F3,F4,F5,F6,F7,F8) .> Out>>::run
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_ecs-0.15.3/src/system/function_system.rs:1005:17
30: <bevy_ecs::system::function_system::FunctionSystem<Marker,F> as bevy_ecs::system::system::System>::run_unsafe
at /Users/simbleau/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_ecs-0.15.3/src/system/function_system.rs:800:19
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Encountered a panic in system `bevy_vello::render::systems::render_frame`! |
If I run it in release mode, everything works fine. Not sure if this is an issue for swash or you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As soon as this doesn't cause a panic when I run it in debug mode I can approve this. It looks great!
Happens here also, peculiar, I'll look into it. |
Something with swash and bevy's default font it seems, asking around a bit what needs to be done to solve it. |
bc4dfab
to
3dfc4db
Compare
f1ae225
to
96e8251
Compare
Awating the panic issue to be solved in swash, here: dfrg/swash#90 |
Awaiting release, patch put into swash. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved as soon as the cargo update is done
PR to integrate parley and font variants.
PR should close #101 .
Using this zulip thread for more direct commuication: https://xi.zulipchat.com/#narrow/channel/205635-parley/topic/.E2.9C.94.20Parley.2C.20layout.20context.2C.20bevy.20and.20multiple.20cores/with/507732907