cloud storage client
git clone https://git.lucas.co/cce-cloud.git
deps: drop glyphon, use cce-ui's cosmic-text re-export
cce-ui no longer depends on glyphon (a wgpu text renderer whose wgpu-side API
was unreachable once the Vulkan path replaced it) — it depends on cosmic-text
directly and re-exports it. Everything this crate named as `glyphon::` was a
cosmic-text re-export, so it now goes through `cce_ui::cosmic_text` and needs
no text-library dependency of its own. That also makes it impossible to drift
onto a second cosmic-text version: a FontSystem handed to cce-ui must be the
same type.
No behavior change — cosmic-text is pinned to the version glyphon resolved to
(=0.12.1) and shaping was verified identical glyph-for-glyph.
Co-Authored-By: Claude <[email protected]>
Cargo.toml | 2 --
src/main.rs | 8 ++++----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index a98bc16..134b675 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,8 +10,6 @@ calloop = "0.13.0"
calloop-wayland-source = "0.3.0"
wayland-client = { version = "0.31", features = ["system"] }
xkeysym = "0.2"
-# glyphon supplies cosmic-text/swash shaping for the cce_ui::vk text stage.
-glyphon = "0.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1", features = ["full"] }
diff --git a/src/main.rs b/src/main.rs
index 8afb8bb..c1e6662 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -42,7 +42,7 @@ use wayland_client::{
};
use calloop_wayland_source::WaylandSource;
-use glyphon::{Attrs, Buffer, FontSystem, Metrics, SwashCache};
+use cce_ui::cosmic_text::{Attrs, Buffer, FontSystem, Metrics, SwashCache};
use cce_ui::vk::{Batch2D, Frame2D, TextSpan, VkRenderer};
@@ -88,8 +88,8 @@ fn make_text_buffer(font_system: &mut FontSystem, text: &str, size: f32) -> Buff
let metrics = Metrics::new(size, size * 1.4);
let mut buffer = Buffer::new(font_system, metrics);
let font_family = cce_ui::layout::control_label_font_parsed().0;
- let attrs = Attrs::new().family(glyphon::Family::Name(&font_family));
- buffer.set_text(font_system, text, attrs, glyphon::Shaping::Advanced);
+ let attrs = Attrs::new().family(cce_ui::cosmic_text::Family::Name(&font_family));
+ buffer.set_text(font_system, text, attrs, cce_ui::cosmic_text::Shaping::Advanced);
buffer.shape_until_scroll(font_system, true);
buffer
}
@@ -3059,7 +3059,7 @@ fn run_daemon(socket_path: &str) {
&mut st.font_system,
FontSystem::new_with_locale_and_db(
"en-US".to_string(),
- glyphon::cosmic_text::fontdb::Database::new(),
+ cce_ui::cosmic_text::fontdb::Database::new(),
),
);
let sc = std::mem::replace(&mut st.swash_cache, SwashCache::new());