diff --git a/examples/headless/Cargo.toml b/examples/headless/Cargo.toml index eeea0efb..37134170 100644 --- a/examples/headless/Cargo.toml +++ b/examples/headless/Cargo.toml @@ -22,4 +22,4 @@ png = "0.17.14" futures-intrusive = { workspace = true } [features] -cosmic_text = ["scenes/cosmic_text"] \ No newline at end of file +cosmic_text = ["scenes/cosmic_text"] diff --git a/examples/scenes/Cargo.toml b/examples/scenes/Cargo.toml index ea27fe1f..3b9396c0 100644 --- a/examples/scenes/Cargo.toml +++ b/examples/scenes/Cargo.toml @@ -30,4 +30,4 @@ web-time = { workspace = true } getrandom = { version = "0.2.15", features = ["js"] } [features] -cosmic_text = ["dep:cosmic-text", "dep:unicode-segmentation"] \ No newline at end of file +cosmic_text = ["dep:cosmic-text", "dep:unicode-segmentation"] diff --git a/examples/scenes/src/cosmic_text_scene.rs b/examples/scenes/src/cosmic_text_scene.rs index 6133aefb..9750e088 100644 --- a/examples/scenes/src/cosmic_text_scene.rs +++ b/examples/scenes/src/cosmic_text_scene.rs @@ -21,9 +21,7 @@ use std::cmp; use std::collections::HashMap; use std::sync::Arc; -pub struct CosmicData {} - -impl TestScene for CosmicTextSceneState { +impl TestScene for CosmicTextScene { fn render(&mut self, scene: &mut Scene, _scene_params: &mut SceneParams) { let buffer_glyphs = &self.buffer_glyphs; let vello_fonts = &self.vello_fonts; @@ -67,13 +65,13 @@ impl TestScene for CosmicTextSceneState { } } -pub struct CosmicTextSceneState { +pub struct CosmicTextScene { pub font_system: FontSystem, pub vello_fonts: HashMap, pub buffer_glyphs: BufferGlyphs, } -impl Default for CosmicTextSceneState { +impl Default for CosmicTextScene { fn default() -> Self { Self::new() } @@ -96,7 +94,7 @@ impl AsRef<[u8]> for CosmicFontBlobAdapter { } } -impl CosmicTextSceneState { +impl CosmicTextScene { pub fn new() -> Self { let mut font_system = FontSystem::new(); let mut vello_fonts = HashMap::new(); diff --git a/examples/scenes/src/test_scenes.rs b/examples/scenes/src/test_scenes.rs index ec8564ba..fe9f5332 100644 --- a/examples/scenes/src/test_scenes.rs +++ b/examples/scenes/src/test_scenes.rs @@ -89,7 +89,7 @@ export_scenes!( blurred_rounded_rect(blurred_rounded_rect), image_sampling(image_sampling), image_extend_modes(image_extend_modes), - #[cfg(feature = "cosmic_text")] cosmic_text_scene(crate::cosmic_text_scene::CosmicTextSceneState::default(), "cosmic_text", false) + #[cfg(feature = "cosmic_text")] cosmic_text_scene(crate::cosmic_text_scene::CosmicTextScene::default(), "cosmic_text", false) ); /// Implementations for the test scenes. diff --git a/vello_tests/Cargo.toml b/vello_tests/Cargo.toml index 504ef4fa..c81dc584 100644 --- a/vello_tests/Cargo.toml +++ b/vello_tests/Cargo.toml @@ -24,4 +24,4 @@ image = { workspace = true, features = ["png"] } scenes = { workspace = true } [features] -cosmic_text = ["scenes/cosmic_text"] \ No newline at end of file +cosmic_text = ["scenes/cosmic_text"]