fix: systematic byte fidelity for config strings and RV7 gaps
Resolves the 9 gap groups in docs/rewrite/notes/review-rv7-codex.md and
audits every string-typed config field against its consumers
(field -> consumers -> decode status table in final-Z9.md):
- Windows EnvMap keys use a port of Zig's nls.zig uppercase table
(upcaseW); Windows locale init follows Zig's chain (setlocale +
_putenv_s); malformed WTF-8 now fails process launch conversions like
Zig instead of substituting U+FFFD; kitty file paths convert WTF-8.
- bash --rcfile/--init-file, configured TERM and inherited GTK LANG
keep their original bytes.
- C API clipboard completion and ghostty_surface_binding_action take
bytes; complete_clipboard_request is byte-typed through the core.
- text:/csi:/esc: bindings, enquiry-response, input = path:, embedded
initial_input, search needles, titles, link regexes, clipboard
codepoint map, command palette text and GTK font/namespace values
decode the escape encoding before use.
Remaining by design: D-Bus a{ss} values and +new-window arguments are
UTF-8 by D-Bus type. C API key/preedit text follows separately.
Test Plan:
- cargo test --workspace
- just check-macos (both), just check-windows, just check-wasm
This commit is contained in:
1 parent
ffc91c31e4
commit
af094276f8
40 files changed
+986
-167
No files matched your search
@@ -5,6 +5,7 @@ edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
ghostty-os.workspace = true
|
||||
tiny-skia = "0.12.0"
|
||||
png = "0.18.1"
|
||||
thiserror = "2.0.21"
|
||||
@@ -33,9 +34,6 @@ harfbuzz-sys = "0.8.0"
|
||||
freetype-sys = { version = "0.23.0", features = ["bundled"] }
|
||||
harfbuzz-sys = { version = "0.8.0", features = ["bundled"] }
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
ghostty-os.workspace = true
|
||||
|
||||
# Apple targets use CoreText (`coretext` backend) by default; FreeType and
|
||||
# HarfBuzz are only linked for the `coretext-freetype` / `coretext-harfbuzz`
|
||||
# backends (see `build.rs` and the `[features]` table).
|
||||
|
||||
@@ -501,7 +501,7 @@ impl Key {
|
||||
let mut descriptors: Vec<Descriptor> = Vec::new();
|
||||
for family in &config.font_family.list {
|
||||
descriptors.push(Descriptor {
|
||||
family: Some(family.clone()),
|
||||
family: Some(ghostty_os::osbytes::config_str_to_text(family)),
|
||||
style: config.font_style.name_value().map(str::to_string),
|
||||
size: font_size.points,
|
||||
variations: config.font_variation.list.clone(),
|
||||
@@ -520,7 +520,7 @@ impl Key {
|
||||
for family in &config.font_family_bold.list {
|
||||
let style = config.font_style_bold.name_value().map(str::to_string);
|
||||
descriptors.push(Descriptor {
|
||||
family: Some(family.clone()),
|
||||
family: Some(ghostty_os::osbytes::config_str_to_text(family)),
|
||||
bold: style.is_none(),
|
||||
style,
|
||||
size: font_size.points,
|
||||
@@ -531,7 +531,7 @@ impl Key {
|
||||
for family in &config.font_family_italic.list {
|
||||
let style = config.font_style_italic.name_value().map(str::to_string);
|
||||
descriptors.push(Descriptor {
|
||||
family: Some(family.clone()),
|
||||
family: Some(ghostty_os::osbytes::config_str_to_text(family)),
|
||||
italic: style.is_none(),
|
||||
style,
|
||||
size: font_size.points,
|
||||
@@ -545,7 +545,7 @@ impl Key {
|
||||
.name_value()
|
||||
.map(str::to_string);
|
||||
descriptors.push(Descriptor {
|
||||
family: Some(family.clone()),
|
||||
family: Some(ghostty_os::osbytes::config_str_to_text(family)),
|
||||
bold: style.is_none(),
|
||||
italic: style.is_none(),
|
||||
style,
|
||||
|
||||
Reference in new issue
Block a user