gpui_wgpu: Bump cosmic-text to v0.19.0 (#56988)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Has been skipped

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Resolves the issues described at
https://github.com/pop-os/cosmic-text/releases/tag/0.19.0
This fix addresses the characters '\u{001C}' | '\u{001D}' | '\u{001E}' |
'\u{0085}' | '\u{2029}', which can cause the Editor gpui-component to
crash, as these characters can cause the 'assert "left == right"'.

Release Notes:
- N/A
This commit is contained in:
Nikita Tikhomirov 2026-05-24 11:33:56 +03:00 committed by GitHub
parent b1180f749c
commit eb2223c080
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 6 deletions

4
Cargo.lock generated
View file

@ -3914,9 +3914,9 @@ dependencies = [
[[package]]
name = "cosmic-text"
version = "0.17.1"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c5c9868e64aa6c5410629a83450e142c80e721c727a5bc0fb18107af6c2d66b"
checksum = "be17b688510d934ce13f48a2beba700e11583e281e0fda99c22bb256a14eda73"
dependencies = [
"bitflags 2.10.0",
"fontdb",

View file

@ -20,7 +20,7 @@ gpui.workspace = true
anyhow.workspace = true
bytemuck = "1"
collections.workspace = true
cosmic-text = "0.17.0"
cosmic-text = "0.19.0"
etagere = "0.2"
itertools.workspace = true
log.workspace = true
@ -51,4 +51,4 @@ criterion.workspace = true
[[bench]]
name = "layout_line"
harness = false
harness = false

View file

@ -1,8 +1,8 @@
use anyhow::{Context as _, Ok, Result};
use collections::HashMap;
use cosmic_text::{
Attrs, AttrsList, Family, Font as CosmicTextFont, FontFeatures as CosmicFontFeatures,
FontSystem, ShapeBuffer, ShapeLine,
Attrs, AttrsList, Ellipsize, Family, Font as CosmicTextFont,
FontFeatures as CosmicFontFeatures, FontSystem, ShapeBuffer, ShapeLine,
};
use gpui::{
Bounds, DevicePixels, Font, FontFallbacks, FontFeatures, FontId, FontMetrics, FontRun, GlyphId,
@ -544,6 +544,7 @@ impl CosmicTextSystemState {
f32::from(font_size),
None, // We do our own wrapping
cosmic_text::Wrap::None,
Ellipsize::None,
None,
&mut layout_lines,
None,