diff --git a/crates/ui-egui/src/dialogs/char_style_options.rs b/crates/ui-egui/src/dialogs/char_style_options.rs index d1ca76cc5..54df0ab91 100644 --- a/crates/ui-egui/src/dialogs/char_style_options.rs +++ b/crates/ui-egui/src/dialogs/char_style_options.rs @@ -26,9 +26,9 @@ const NUMBERS: &[&str] = &["size", "leading", "kerning", "tracking"]; /// The on, off or unset checkboxes. const SWITCHES: &[&str] = &["underline", "strikethrough", "standardVerticalRoman"]; /// The attributes of Advanced Character Formats, in the order the section shows them. -const ADVANCED: &[&str] = &["h_scale", "v_scale", "baseline_shift", "rotation", "language"]; +const ADVANCED: &[&str] = &["h_scale", "v_scale", "baseline_shift", "tcyUpDown", "tcyLeftRight", "rotation", "language"]; /// The number fields of Advanced Character Formats. -const ADVANCED_NUMBERS: &[&str] = &["h_scale", "v_scale", "baseline_shift", "rotation"]; +const ADVANCED_NUMBERS: &[&str] = &["h_scale", "v_scale", "baseline_shift", "tcyUpDown", "tcyLeftRight", "rotation"]; /// The attributes of Character Color. const COLOR: &[&str] = &["fill", "stroke", "stroke_width", "overprint_fill", "overprint_stroke"]; /// The fields of Character Color: the fill and stroke paints, their tints in percent, the stroke @@ -78,6 +78,8 @@ pub(super) const SPEC: DialogSpec = DialogSpec { "h_scale", "v_scale", "baseline_shift", + "tcyUpDown", + "tcyLeftRight", "rotation", "language", "fill", @@ -250,6 +252,8 @@ fn optional_number(d: &Dialog, key: &str) -> Result, String> { "h_scale" => tl!("Horizontal Scale"), "v_scale" => tl!("Vertical Scale"), "baseline_shift" => tl!("Baseline Shift"), + "tcyUpDown" => tl!("Tate-chu-yoko Up/Down"), + "tcyLeftRight" => tl!("Tate-chu-yoko Left/Right"), "rotation" => tl!("Character Rotation"), "fill_tint" => tl!("Fill Tint"), "stroke_tint" => tl!("Stroke Tint"), @@ -281,7 +285,7 @@ fn optional_number(d: &Dialog, key: &str) -> Result, String> { if ["h_scale", "v_scale"].contains(&key) && !(1.0..=10000.0).contains(&n) { return Err(format!("{label} must be a number from 1 to 10000")); } - if key == "baseline_shift" && !(-1296.0..=1296.0).contains(&n) { + if ["baseline_shift", "tcyUpDown", "tcyLeftRight"].contains(&key) && !(-1296.0..=1296.0).contains(&n) { return Err(format!("{label} must be a number from -1296 to 1296")); } // Weight from 0 to the document limit, a tint from 0% to 100%. @@ -564,7 +568,7 @@ pub(crate) fn reset_basic(d: &mut Dialog) { } } -/// Reset Panel in Advanced Character Formats: its five attributes become unset. +/// Reset Panel in Advanced Character Formats: its seven attributes become unset. pub(crate) fn reset_advanced(d: &mut Dialog) { d.fields.insert("__resetAdvanced".into(), json!(true)); for key in ADVANCED_NUMBERS { @@ -718,14 +722,16 @@ pub(crate) fn basic_body(ui: &mut egui::Ui, d: &mut Dialog) { }); } -/// Advanced Character Formats: Horizontal Scale, Vertical Scale, Baseline Shift, Character Rotation -/// and Language, each empty (unset) or set. +/// Advanced Character Formats: Horizontal Scale, Vertical Scale, Baseline Shift, the Tate-chu-yoko +/// Up/Down and Left/Right, Character Rotation and Language, each empty (unset) or set. pub(crate) fn advanced_body(ui: &mut egui::Ui, d: &mut Dialog) { egui::Grid::new("character-style-advanced").num_columns(2).spacing([18.0, 8.0]).show(ui, |ui| { for (key, caption, unit) in [ ("h_scale", tl!("Horizontal Scale"), "%"), ("v_scale", tl!("Vertical Scale"), "%"), ("baseline_shift", tl!("Baseline Shift"), "pt"), + ("tcyUpDown", tl!("Tate-chu-yoko Up/Down"), "pt"), + ("tcyLeftRight", tl!("Tate-chu-yoko Left/Right"), "pt"), ("rotation", tl!("Character Rotation"), "°"), ] { let row = ui.label(caption); @@ -1473,11 +1479,19 @@ mod tests { } #[test] - fn advanced_section_shows_its_five_controls() { + fn advanced_section_shows_its_seven_controls() { let mut d = dialog_for(json!({})); let mut app = app(); let shown = crate::tests_labels::painted_text(&mut app, |_, ui| advanced_body(ui, &mut d)); - for label in ["Horizontal Scale", "Vertical Scale", "Baseline Shift", "Character Rotation", "Language:"] { + for label in [ + "Horizontal Scale", + "Vertical Scale", + "Baseline Shift", + "Tate-chu-yoko Up/Down", + "Tate-chu-yoko Left/Right", + "Character Rotation", + "Language:", + ] { assert!(shown.contains(label), "{label}: {shown}"); } } @@ -1569,6 +1583,85 @@ mod tests { assert!(!def.attrs.contains_key("v_scale")); } + #[test] + fn tate_chu_yoko_offsets_show_set_reset_and_keep_their_limits() { + let d = dialog_for(json!({"tcyUpDown": 2.0, "size": 12.0})); + assert_eq!((d.fields["tcyUpDown"].clone(), d.fields["tcyLeftRight"].clone()), (json!(2.0), json!(""))); + assert_eq!(edited_attrs(&d).unwrap(), attrs(json!({"tcyUpDown": 2.0, "size": 12.0}))); + // A value a style captured from scaled text stays while its field is untouched. + assert_eq!(edited_attrs(&dialog_for(json!({"tcyLeftRight": 3000.0}))).unwrap(), attrs(json!({"tcyLeftRight": 3000.0}))); + + let mut d = dialog_for(json!({"tcyUpDown": 2.0})); + d.fields.insert("tcyUpDown".into(), json!("")); + d.fields.insert("tcyLeftRight".into(), json!("-1296")); + assert_eq!(edited_attrs(&d).unwrap(), attrs(json!({"tcyLeftRight": -1296.0}))); + d.fields.insert("tcyLeftRight".into(), json!("0")); + assert_eq!(edited_attrs(&d).unwrap(), attrs(json!({"tcyLeftRight": 0.0}))); + for (key, value, message) in [ + ("tcyUpDown", "1296.1", "Tate-chu-yoko Up/Down must be a number from -1296 to 1296"), + ("tcyLeftRight", "-1296.1", "Tate-chu-yoko Left/Right must be a number from -1296 to 1296"), + ("tcyUpDown", "high", "Tate-chu-yoko Up/Down must be a number"), + ("tcyLeftRight", "NaN", "Tate-chu-yoko Left/Right must be a number"), + ] { + let mut d = dialog_for(json!({})); + d.fields.insert(key.into(), json!(value)); + assert_eq!(edited_attrs(&d).unwrap_err(), message, "{key} {value}"); + } + + let mut d = dialog_for(json!({"tcyUpDown": 2.0, "tcyLeftRight": -1.0, "size": 12.0})); + d.fields.insert("section".into(), json!("advanced")); + reset_section(&mut d); + assert_eq!(edited_attrs(&d).unwrap(), attrs(json!({"size": 12.0}))); + } + + #[test] + fn tate_chu_yoko_offsets_preview_cancel_and_commit_to_the_style_and_its_text() { + let mut app = app(); + app.run("charStyle.new", json!({"name": "Body", "attrs": {"size": 24.0, "tcyLeftRight": 0.0}})).unwrap(); + let id = app.run("text.create", json!({"x": 10, "y": 40, "text": "Text"})).unwrap()["id"].as_u64().unwrap(); + app.run("charStyle.apply", json!({"name": "Body", "id": id})).unwrap(); + app.run("text.setRangeStyle", json!({"id": id, "start": 2, "end": 4, "tcyLeftRight": 5.0})).unwrap(); + let before = app.session.doc().unwrap().doc.clone(); + let undo = app.session.doc().unwrap().history.undo.len(); + open(&mut app, "Body").unwrap(); + { + let d = app.ui.dialog.as_mut().unwrap(); + d.fields.insert("section".into(), json!("advanced")); + d.fields.insert("tcyUpDown".into(), json!("4")); + } + frame(&mut app); + assert_eq!(app.session.doc().unwrap().doc.char_styles[0].attrs["tcyUpDown"], json!(4.0)); + super::super::cancel(&mut app); + assert_eq!(app.session.doc().unwrap().doc, before); + assert_eq!(app.session.doc().unwrap().history.undo.len(), undo); + + open(&mut app, "Body").unwrap(); + { + let d = app.ui.dialog.as_mut().unwrap(); + d.fields.insert("tcyUpDown".into(), json!("4")); + d.fields.insert("tcyLeftRight".into(), json!("-3")); + } + super::super::confirm(&mut app).unwrap(); + let state = app.session.doc().unwrap(); + assert_eq!(state.history.undo.len(), undo + 1); + assert_eq!(state.doc.char_styles[0].attrs, attrs(json!({"size": 24.0, "tcyUpDown": 4.0, "tcyLeftRight": -3.0}))); + let vectorcraft_doc::NodeKind::Text(t) = &state.doc.node(vectorcraft_doc::NodeId(id)).unwrap().kind else { panic!("text") }; + assert_eq!(t.runs.iter().map(|r| (r.style.tcy_up_down, r.style.tcy_left_right)).collect::>(), [(4.0, -3.0), (4.0, 5.0)]); + app.run("edit.undo", json!({})).unwrap(); + assert_eq!(app.session.doc().unwrap().doc, before); + + app.run("ui.newCharStyle", json!({})).unwrap(); + { + let d = app.ui.dialog.as_mut().unwrap(); + d.fields.insert("name".into(), json!("Shifted")); + d.fields.insert("tcyLeftRight".into(), json!("6")); + } + super::super::confirm(&mut app).unwrap(); + let doc = &app.session.doc().unwrap().doc; + let def = doc.char_styles.iter().find(|def| def.name == "Shifted").unwrap(); + assert_eq!(def.attrs["tcyLeftRight"], json!(6.0)); + } + /// The negated tags of the twenty stylistic sets: an explicit empty Stylistic Sets choice. fn no_sets() -> Vec { vectorcraft_text::EXTRA_FEATURES[..20].iter().map(|s| format!("-{s}")).collect() diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index d83b5ac3c..79f6936cc 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -3445,6 +3445,8 @@ digits Malayalam Малаялам Scale at Center Мащабиране от центъра Up/Down: Нагоре/надолу: Left/Right: Наляво/надясно: + Tate-chu-yoko Up/Down Тате-чу-йоко нагоре/надолу + Tate-chu-yoko Left/Right Тате-чу-йоко наляво/надясно Temperature Температура Temperature/Tint… Температура/Нюанс… Template Шаблон diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 663e95cea..94603a6d2 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -1554,6 +1554,8 @@ digits Malayalam Malajalam Scale at Center Skaliraj od centra Up/Down: Gore/dolje: Left/Right: Lijevo/desno: + Tate-chu-yoko Up/Down Tate-chu-yoko gore/dolje + Tate-chu-yoko Left/Right Tate-chu-yoko lijevo/desno Underline Podvučeno Vertical Scale % Okomita skala % Axis Osa diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 9c60e87e0..05e316d62 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -4417,6 +4417,8 @@ digits Malayalam Malaiàlam Scale at Center Escala des del centre Up/Down: Amunt/avall: Left/Right: Esquerra/dreta: + Tate-chu-yoko Up/Down Tate-chu-yoko amunt/avall + Tate-chu-yoko Left/Right Tate-chu-yoko esquerra/dreta Technical Drawing Dibuix tècnic Temperature Temperatura Temperature/Tint… Temperatura/To… diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index e8f9666fa..4f44fe375 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -1578,6 +1578,8 @@ digits Malayalam Malajálamské Scale at Center Měřítko od středu Up/Down: Nahoru/dolů: Left/Right: Vlevo/vpravo: + Tate-chu-yoko Up/Down Tate-chu-yoko nahoru/dolů + Tate-chu-yoko Left/Right Tate-chu-yoko vlevo/vpravo Underline Podtržení Vertical Scale % Svislá změna velikosti % Axis Osa diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 31915ed6b..ae4ae2fd3 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -1489,6 +1489,8 @@ digits Malayalam Malayalam Scale at Center Skalér fra midten Up/Down: Op/ned: Left/Right: Venstre/højre: + Tate-chu-yoko Up/Down Tate-chu-yoko op/ned + Tate-chu-yoko Left/Right Tate-chu-yoko venstre/højre Underline Understreget Vertical Scale % Lodret skalering % Axis Akse diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 2c5424d81..8bc91bcd5 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -3477,6 +3477,8 @@ effect Points Punkte Scale at Center Von der Mitte aus skalieren Up/Down: Oben/Unten: Left/Right: Links/Rechts: + Tate-chu-yoko Up/Down Tate-chu-yoko oben/unten + Tate-chu-yoko Left/Right Tate-chu-yoko links/rechts Temperature Temperatur Temperature/Tint… Temperatur/Farbstich… Template Vorlage diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 6071ed5be..69931f243 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -3907,6 +3907,8 @@ digits Malayalam Μαλαγιάλαμ Scale at Center Κλιμάκωση από το κέντρο Up/Down: Πάνω/Κάτω: Left/Right: Αριστερά/Δεξιά: + Tate-chu-yoko Up/Down Tate-chu-yoko πάνω/κάτω + Tate-chu-yoko Left/Right Tate-chu-yoko αριστερά/δεξιά Temperature/Tint… Θερμοκρασία/Απόχρωση… Templates Folder Φάκελος προτύπων Text Displayed in Cell: Κείμενο που εμφανίζεται στο κελί: diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 4a74e3ae3..0837f1230 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -3532,6 +3532,8 @@ digits Malayalam Malayálam Scale at Center Escalar desde el centro Up/Down: Arriba/abajo: Left/Right: Izquierda/derecha: + Tate-chu-yoko Up/Down Tate-chu-yoko arriba/abajo + Tate-chu-yoko Left/Right Tate-chu-yoko izquierda/derecha Temperature Temperatura Temperature/Tint… Temperatura/tinte… Template Plantilla diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index f2ec64f60..aa318f0c6 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -1551,6 +1551,8 @@ digits Malayalam Malajalam Scale at Center Skaalaa keskeltä Up/Down: Ylös/alas: Left/Right: Vasen/oikea: + Tate-chu-yoko Up/Down Tate-chu-yoko ylös/alas + Tate-chu-yoko Left/Right Tate-chu-yoko vasen/oikea Underline Alleviivaus Vertical Scale % Pystyskaalaus % Axis Akseli diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 807b3363b..97ec206b6 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -3524,6 +3524,8 @@ digits Malayalam Malayalam Scale at Center Mettre à l’échelle depuis le centre Up/Down: Haut/bas : Left/Right: Gauche/droite : + Tate-chu-yoko Up/Down Tate-chu-yoko haut/bas + Tate-chu-yoko Left/Right Tate-chu-yoko gauche/droite Temperature Température Temperature/Tint… Température/teinte… Template Modèle diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 572a19779..cf6fbe4c0 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -2449,6 +2449,8 @@ antiAlias Sharp शार्प Left-to-Right Paragraph Direction बाएँ-से-दाएँ पैराग्राफ़ दिशा Left: बाएँ: Left/Right: बाएं / दाएं: + Tate-chu-yoko Up/Down ताते-चू-योको ऊपर/नीचे + Tate-chu-yoko Left/Right ताते-चू-योको बाएं/दाएं Legacy .ai Options पुराने .ai फ़ॉर्मैट के ऑप्शन्स Legacy (version 7) पुराना फ़ॉर्मैट (संस्करण 7) Legacy Macintosh RGB (Gamma 1.8) पुराना Macintosh RGB (गामा 1.8) diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 8c2d2339b..9bf1e63b6 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -4186,6 +4186,8 @@ mark-style Japanese Japán Scale at Center Méretezés középről Up/Down: Fel/le: Left/Right: Balra/jobbra: + Tate-chu-yoko Up/Down Tate-chu-yoko fel/le + Tate-chu-yoko Left/Right Tate-chu-yoko balra/jobbra Technical Drawing Műszaki rajz Temperature Színhőmérséklet Temperature/Tint… Színhőmérséklet/tónus… diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 606ffae97..fb0416342 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -1489,6 +1489,8 @@ digits Malayalam Malayalam Scale at Center Skalakan dari tengah Up/Down: Atas/bawah: Left/Right: Kiri/kanan: + Tate-chu-yoko Up/Down Tate-chu-yoko atas/bawah + Tate-chu-yoko Left/Right Tate-chu-yoko kiri/kanan Underline Garis bawah Vertical Scale % Skala vertikal % Axis Sumbu diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index bf4c9e7b5..70416f590 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -3569,6 +3569,8 @@ digits Malayalam Malayalam Scale at Center Ridimensiona dal centro Up/Down: Su/giù: Left/Right: Sinistra/destra: + Tate-chu-yoko Up/Down Tate-chu-yoko su/giù + Tate-chu-yoko Left/Right Tate-chu-yoko sinistra/destra Temperature Temperatura Temperature/Tint… Temperatura/tinta… Template Modello diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 7a12afcad..49493ace6 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -3894,6 +3894,8 @@ file-filter Templates テンプレート Scale at Center 中心から拡大・縮小 Up/Down: 上下: Left/Right: 左右: + Tate-chu-yoko Up/Down 縦中横の上下 + Tate-chu-yoko Left/Right 縦中横の左右 Temperature 色温度 Template テンプレート Templates テンプレート diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index c58480c42..0a0459199 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -1423,6 +1423,8 @@ digits Malayalam მალაიალამური Scale at Center ცენტრიდან მასშტაბირება Up/Down: ზემოთ/ქვემოთ: Left/Right: მარცხნივ/მარჯვნივ: + Tate-chu-yoko Up/Down Tate-chu-yoko ზემოთ/ქვემოთ + Tate-chu-yoko Left/Right Tate-chu-yoko მარცხნივ/მარჯვნივ Underline ხაზგასმული Vertical Scale % ვერტიკალური მასშტაბი % Axis ღერძი diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 39efdecf2..c9b1f17ed 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -3882,6 +3882,8 @@ file-filter Templates 템플릿 Scale at Center 중심에서 크기 조정 Up/Down: 위/아래: Left/Right: 왼쪽/오른쪽: + Tate-chu-yoko Up/Down 다테추요코 위/아래 + Tate-chu-yoko Left/Right 다테추요코 왼쪽/오른쪽 Temperature 색온도 Template 템플릿 Templates 템플릿 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index dd1d22edc..f37719585 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -1503,6 +1503,8 @@ digits Malayalam Malayalam Scale at Center Schalen vanuit het midden Up/Down: Omhoog/omlaag: Left/Right: Links/rechts: + Tate-chu-yoko Up/Down Tate-chu-yoko omhoog/omlaag + Tate-chu-yoko Left/Right Tate-chu-yoko links/rechts Underline Onderstrepen Vertical Scale % Verticale schaal % Axis As diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index dd850a3a4..7a8c65613 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -1490,6 +1490,8 @@ digits Malayalam Malajalam Scale at Center Skaluj od środka Up/Down: W górę/w dół: Left/Right: W lewo/w prawo: + Tate-chu-yoko Up/Down Tate-chu-yoko w górę/w dół + Tate-chu-yoko Left/Right Tate-chu-yoko w lewo/w prawo Underline Podkreślenie Vertical Scale % Skala pionowa % Axis Oś diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index f67ae6cda..ad4da88e2 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -5026,6 +5026,8 @@ axis Both Ambos Scale at Center Dimensionar a partir do centro Up/Down: Para Cima/Para Baixo: Left/Right: Esquerda/Direita: + Tate-chu-yoko Up/Down Tate-chu-yoko Para Cima/Para Baixo + Tate-chu-yoko Left/Right Tate-chu-yoko Esquerda/Direita Temperature Temperatura Templates Modelos Text Wrap Options Opções de Quebra de Texto diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 8eb542582..bb04028c6 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -3564,6 +3564,8 @@ digits Malayalam Малаялам Scale at Center Масштабировать от центра Up/Down: Вверх/вниз: Left/Right: Влево/вправо: + Tate-chu-yoko Up/Down Tate-chu-yoko вверх/вниз + Tate-chu-yoko Left/Right Tate-chu-yoko влево/вправо Temperature Температура Temperature/Tint… Температура/оттенок… Template Шаблон diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index fb2c463de..ec6ab02c5 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -3454,6 +3454,8 @@ digits Malayalam Malayalam Scale at Center Skala från mitten Up/Down: Upp/ned: Left/Right: Vänster/höger: + Tate-chu-yoko Up/Down Tate-chu-yoko upp/ned + Tate-chu-yoko Left/Right Tate-chu-yoko vänster/höger Temperature Temperatur Temperature/Tint… Temperatur/färgton… Template Mall diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index d45a171cc..85b777b49 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -3345,6 +3345,8 @@ digits Malayalam Malayalam Scale at Center Merkezden Ölçekle Up/Down: Yukarı/Aşağı: Left/Right: Sol/Sağ: + Tate-chu-yoko Up/Down Tate-chu-yoko Yukarı/Aşağı + Tate-chu-yoko Left/Right Tate-chu-yoko Sol/Sağ Temperature Sıcaklık Temperature/Tint… Sıcaklık/Renk Tonu… Template Şablon diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index acaf20b6b..6143515d1 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -3562,6 +3562,8 @@ effect Points Точки Scale at Center Масштабувати від центру Up/Down: Вгору/вниз: Left/Right: Ліворуч/праворуч: + Tate-chu-yoko Up/Down Tate-chu-yoko вгору/вниз + Tate-chu-yoko Left/Right Tate-chu-yoko ліворуч/праворуч Temperature Температура Temperature/Tint… Температура/відтінок… Template Шаблон diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 4a2bbd5a6..2a180c77e 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -3896,6 +3896,8 @@ mark-style Japanese Kiểu Nhật Scale at Center Co giãn từ tâm Up/Down: Lên/Xuống: Left/Right: Trái/Phải: + Tate-chu-yoko Up/Down Tate-chu-yoko lên/xuống + Tate-chu-yoko Left/Right Tate-chu-yoko trái/phải Temperature Nhiệt độ màu Temperature/Tint… Nhiệt độ màu/Tông… Template Mẫu diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 0eb7c7ebe..5ad1cb7f0 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -3397,6 +3397,8 @@ digits Malayalam 马拉雅拉姆数字 Scale at Center 从中心缩放 Up/Down: 上/下: Left/Right: 左/右: + Tate-chu-yoko Up/Down 纵中横上/下 + Tate-chu-yoko Left/Right 纵中横左/右 Temperature 色温 Temperature/Tint… 色温/色调… Template 模板 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 084a7e770..8b3a63d01 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -4511,6 +4511,8 @@ digits Malayalam 馬來亞拉姆數字 Scale at Center 從中心縮放 Up/Down: 上/下: Left/Right: 左/右: + Tate-chu-yoko Up/Down 縱中橫上/下 + Tate-chu-yoko Left/Right 縱中橫左/右 Temperature 色溫 Temperature/Tint… 色溫/色調… Template 範本 diff --git a/docs/mcp.md b/docs/mcp.md index 5826c5c8c..6838845df 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -7374,13 +7374,14 @@ Character Style Options uses `charStyle.edit {name, to, attrs}` to replace the n attribute map in one undo step. `to` is trimmed and must be unique. The command updates text using the style while preserving local overrides; Undo/Redo restores the definition and its users. The `charStyleOptions` dialog exposes `name`, `font_family`, `font_style`, `size`, `leading`, `kerning`, `tracking`, `case`, -`position`, `underline`, `strikethrough`, `charAlign`, `h_scale`, `v_scale`, `baseline_shift`, `rotation`, -`language`, `fill`, `fill_tint`, `stroke`, `stroke_tint`, `stroke_width`, `overprint_fill`, `overprint_stroke`, +`position`, `underline`, `strikethrough`, `charAlign`, `h_scale`, `v_scale`, `baseline_shift`, `tcyUpDown`, +`tcyLeftRight`, `rotation`, `language`, `fill`, `fill_tint`, `stroke`, `stroke_tint`, `stroke_width`, `overprint_fill`, `overprint_stroke`, `ot_figure`, `ot_position`, `ot_liga`, `ot_calt`, `ot_dlig`, `ot_swsh`, `ot_salt`, `ot_titl`, `ot_ordn`, `ot_frac`, `ot_sets`, `section` (`general`, `basic`, `advanced`, `color` or `opentype`), and `preview`. An empty field leaves its attribute unset. `leading` and `kerning` also accept `Auto` to store an explicit automatic value. Advanced Character Formats holds `h_scale` and `v_scale` (percent, 1 to 10000), -`baseline_shift` (points, -1296 to 1296), `rotation` (degrees, stored from -180 to 180) and `language` (a name or tag from Document +`baseline_shift` (points, -1296 to 1296), the Tate-chu-yoko Settings `tcyUpDown` and `tcyLeftRight` (points, +-1296 to 1296, as `text.setRangeStyle` takes them; an explicit 0 stays distinct from unset), `rotation` (degrees, stored from -180 to 180) and `language` (a name or tag from Document Setup's languages; English: USA stores the explicit default `null`, and a tag not in the list that the style already has is kept). Language sets the language the characters are shaped in; it does not change hyphenation or spelling. @@ -7409,7 +7410,7 @@ captured attributes. Without selected text, it starts with the character default (including `charAlign: "emBoxCenter"` in Japanese); changing a Basic field keeps other seeded attributes. Without selected text, the New Paragraph Style dialog sends no `attrs`, and the engine gives the new style the paragraph defaults for the interface language. Reset Panel in Basic Character -Formats removes those fields from the definition, Reset Panel in Advanced Character Formats removes its five, Reset +Formats removes those fields from the definition, Reset Panel in Advanced Character Formats removes its seven, Reset Panel in Character Color removes its five attributes and Reset Panel in OpenType Features removes `features`. `ui.charStyleOptions.resetPanel {}` performs that reset for the section selected in either character-style dialog; it is disabled on General. diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index b4c949f74..2650c263e 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -629,7 +629,7 @@ since 2026-10-01. - **Character-style Auto leading:** capture and explicit style attributes retain Auto as a reset, distinct from omitted leading. Redefine and later numeric updates preserve local leading overrides; the Character Styles marker recognizes Auto correctly. Regression assertions cover partial definitions, Undo/Redo and native save/load serialization. Public references: [Character and paragraph styles](https://helpx.adobe.com/illustrator/using/character-paragraph-styles.html) and [Leading](https://helpx.adobe.com/illustrator/using/line-character-spacing.html). - **Character-style numeric bounds:** `charStyle.new`, `charStyle.edit`, and `charStyle.setAttrs` accept size from 0.1 to 1296 pt, explicit leading from 0.1 to 5000 pt, horizontal and vertical scale from 1% to 10,000%, and baseline shift and Tate-chu-yoko offsets from -1296 to 1296 pt. Out-of-range input leaves the style and Undo history unchanged; Auto leading remains available. These limits match the Character panel controls. - **Character Style Options, General and Basic Character Formats:** the dialog edits a style's name and stored character formats together. Empty fields remain unset, checkboxes show an indeterminate unset state, Basic's Reset Panel clears its explicit settings, and Preview can be canceled without changing history. OK saves one undo step; New Character Style offers the same fields from captured text or the interface language's defaults without a selection. Public reference: [Character and paragraph styles](https://helpx.adobe.com/illustrator/using/character-paragraph-styles.html). -- **Character Style Options, Advanced Character Formats:** Character Style Options and New Character Style set a style's Horizontal Scale and Vertical Scale (1% to 10,000%), Baseline Shift (-1296 pt to 1296 pt), Character Rotation (stored from -180° to 180°) and Language; text that uses the style takes them and keeps its local overrides. Empty fields remain unset, an explicit 100%, 0° or English: USA stays distinct from unset, and the section's Reset Panel clears only these five. Language sets the language the characters are shaped in, not hyphenation or spelling. Public reference: [Character and paragraph styles](https://helpx.adobe.com/illustrator/using/character-paragraph-styles.html). +- **Character Style Options, Advanced Character Formats:** Character Style Options and New Character Style set a style's Horizontal Scale and Vertical Scale (1% to 10,000%), Baseline Shift (-1296 pt to 1296 pt), the Tate-chu-yoko Settings Up/Down and Left/Right (-1296 pt to 1296 pt), Character Rotation (stored from -180° to 180°) and Language; text that uses the style takes them and keeps its local overrides. Empty fields remain unset, an explicit 100%, 0 pt, 0° or English: USA stays distinct from unset, and the section's Reset Panel clears only these seven. Language sets the language the characters are shaped in, not hyphenation or spelling. Public references: [Character and paragraph styles](https://helpx.adobe.com/illustrator/using/character-paragraph-styles.html) and [Format East Asian characters](https://helpx.adobe.com/illustrator/using/formatting-asian-characters.html). - **Character Style Options, Character Color and OpenType Features:** Character Style Options and New Character Style set a style's fill and stroke (None or a document swatch; a global swatch stays linked, with a Tint from 0% to 100%), stroke Weight, Overprint Fill and Overprint Stroke, and its Figure, Position, Standard and Discretionary Ligatures, Contextual, Stylistic and Titling Alternates, Swash, Ordinals, Fractions and Stylistic Sets 1 to 20; text that uses the style takes them and keeps its local overrides, and editing a global swatch later updates the style and its text. Empty controls remain unset, an explicit None, off, Default Figure or Default Position stays distinct from unset, each stylistic set is on, off or unset, a gradient or pattern paint stays until another paint is chosen, a changed OpenType control keeps the style's other feature tags, and each section's Reset Panel clears only its own attributes. Public references: [Character and paragraph styles](https://helpx.adobe.com/illustrator/using/character-paragraph-styles.html) and [Format text with OpenType features](https://helpx.adobe.com/illustrator/desktop/design-with-text/special-characters-glyphs/format-text-with-opentype-features.html). - **Opening style options from the style panels:** a double-click on a user character style's row opens its Character Style Options (`ui.charStyleOptions`), as the panel menu's item does; a paragraph style's row opens its Paragraph Style Options, the rename dialog (`ui.paramDialog` running `paraStyle.rename`) the panel menu opens. A single click still applies the style, the second click of the double-click does not apply it again, and the built-in Normal style opens no dialog. Test `panels::text_styles::tests::double_clicking_a_character_style_row_opens_its_options`. - **Character Style Options window size:** the dialog keeps a fixed width wide enough for the widest tab's controls and scrolls its sections inside a window shorter than them, so it stays on screen and its OK and Cancel buttons stay visible; the width is the same in every section and the height follows the section. Test `dialogs::char_style_options::tests::the_sections_scroll_in_a_window_shorter_than_the_general_list`.