cosmic-edit/Cargo.toml
aquiles 801c7fa68c Fix character counting in document statistics to use graphemes
- Add unicode-segmentation dependency for proper grapheme cluster support
- Replace chars() iteration with graphemes(true) for accurate character counting
- Fix counting of complex Unicode characters like emojis, combining characters, and multi-byte sequences
- Resolves TODO: 'do graphemes?' in document_statistics function

This change provides more accurate character counts for international text,
emojis with skin tones, combined characters, and other multi-codepoint graphemes.

Examples of improved accuracy:
- 👍🏾 now counts as 1 character instead of 2
- é (e + combining acute) counts as 1 character instead of 2
- 🧑‍💻 (person technologist) counts as 1 character instead of 4
2025-10-09 08:34:18 -06:00

73 lines
2 KiB
TOML

[package]
name = "cosmic-edit"
version = "0.1.0"
authors = ["Jeremy Soller <jeremy@system76.com>"]
edition = "2024"
license = "GPL-3.0-only"
rust-version = "1.85"
[dependencies]
dirs = "6"
env_logger = "0.11.8"
grep = "0.3.2"
ignore = "0.4.23"
log = "0.4.28"
notify = "8.2.0"
open = "5.3.2"
paste = "1.0.15"
patch = "0.7.0"
regex = "1.11"
serde = { version = "1", features = ["serde_derive"] }
tokio = { version = "1", features = ["process", "time"] }
# Extra syntax highlighting
syntect = "5.2.0"
two-face = "0.4.3"
# Internationalization
icu = { version = "2.0.0", features = ["compiled_data"] }
unicode-segmentation = "1.12"
i18n-embed = { version = "0.16", features = [
"fluent-system",
"desktop-requester",
] }
i18n-embed-fl = "0.10"
rust-embed = "8"
[dependencies.cosmic-files]
git = "https://github.com/pop-os/cosmic-files.git"
default-features = false
[dependencies.cosmic-syntax-theme]
git = "https://github.com/pop-os/cosmic-syntax-theme.git"
[dependencies.cosmic-text]
git = "https://github.com/pop-os/cosmic-text.git"
features = ["syntect", "vi"]
[dependencies.libcosmic]
git = "https://github.com/pop-os/libcosmic.git"
default-features = false
#TODO: a11y feature crashes file choser dialog
features = ["about", "multi-window", "tokio", "winit", "surface-message"]
[target.'cfg(unix)'.dependencies]
fork = "0.2"
[features]
default = ["dbus-config", "gvfs", "wgpu", "wayland"]
dbus-config = ["libcosmic/dbus-config"]
gvfs = ["cosmic-files/gvfs"]
wgpu = ["libcosmic/wgpu", "cosmic-files/wgpu"]
wayland = ["libcosmic/wayland", "cosmic-files/wayland"]
[profile.release-with-debug]
inherits = "release"
debug = true
[patch.crates-io]
onig = { git = "https://github.com/rust-onig/rust-onig.git", branch = "main" }
onig_sys = { git = "https://github.com/rust-onig/rust-onig.git", branch = "main" }
# [patch.'https://github.com/pop-os/libcosmic']
# libcosmic = { path = "../libcosmic" }
# cosmic-config = { path = "../libcosmic/cosmic-config" }
# cosmic-theme = { path = "../libcosmic/cosmic-theme" }