From 94a6917c683d934cf66a0641341dbf5331537ec4 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 1 Nov 2026 00:23:05 -0700 Subject: [PATCH] Character Styles: Advanced Character Formats takes scales and baseline shift up to the document limit Horizontal Scale and Vertical Scale accept any number above 0 and at most 4000000 %, and Baseline Shift accepts -4000000 to 4000000 pt, the limits the document model keeps a character style in. Character Rotation is stored from -180 to 180 degrees, as text.setFormat stores it. A scale outside its limit shows the new message "{label} must be a number above 0 and at most {max}", translated in every catalog that has Basic Character Formats. --- .../ui-egui/src/dialogs/char_style_options.rs | 35 +++++++++++-------- crates/ui-egui/src/i18n/ca.tsv | 1 + crates/ui-egui/src/i18n/cs.tsv | 1 + crates/ui-egui/src/i18n/de.tsv | 1 + crates/ui-egui/src/i18n/el.tsv | 1 + crates/ui-egui/src/i18n/es.tsv | 1 + crates/ui-egui/src/i18n/fi.tsv | 1 + crates/ui-egui/src/i18n/fr.tsv | 1 + crates/ui-egui/src/i18n/hu.tsv | 1 + crates/ui-egui/src/i18n/it.tsv | 1 + crates/ui-egui/src/i18n/ja.tsv | 1 + crates/ui-egui/src/i18n/ka.tsv | 1 + crates/ui-egui/src/i18n/ko.tsv | 1 + crates/ui-egui/src/i18n/pl.tsv | 1 + crates/ui-egui/src/i18n/pt-br.tsv | 1 + crates/ui-egui/src/i18n/ru.tsv | 1 + crates/ui-egui/src/i18n/sv.tsv | 1 + crates/ui-egui/src/i18n/tr.tsv | 1 + crates/ui-egui/src/i18n/uk.tsv | 1 + crates/ui-egui/src/i18n/vi.tsv | 1 + crates/ui-egui/src/i18n/zh-hans.tsv | 1 + crates/ui-egui/src/i18n/zh-hant.tsv | 1 + docs/mcp.md | 4 +-- docs/target-app-parity.md | 2 +- 24 files changed, 44 insertions(+), 18 deletions(-) diff --git a/crates/ui-egui/src/dialogs/char_style_options.rs b/crates/ui-egui/src/dialogs/char_style_options.rs index 8142f9d44..b535f8c4a 100644 --- a/crates/ui-egui/src/dialogs/char_style_options.rs +++ b/crates/ui-egui/src/dialogs/char_style_options.rs @@ -151,16 +151,16 @@ fn optional_number(d: &Dialog, key: &str) -> Result, String> { if ["size", "leading"].contains(&key) && n < 0.1 { return Err(format!("{label} must be a number of at least 0.1")); } - // The limits text.setRangeStyle gives scales and baseline shift. - let limits = match key { - "h_scale" | "v_scale" => Some((1.0, 10000.0)), - "baseline_shift" => Some((-1296.0, 1296.0)), - _ => None, - }; - if let Some((min, max)) = limits.filter(|(min, max)| !(*min..=*max).contains(&n)) { + // The limits the document model keeps scales and baseline shift in. + let max = vectorcraft_doc::MAX_COORD; + if ["h_scale", "v_scale"].contains(&key) && !(n > 0.0 && n <= max) { + return Err(format!("{label} must be a number above 0 and at most {max}")); + } + let min = -max; + if key == "baseline_shift" && !(min..=max).contains(&n) { return Err(format!("{label} must be a number from {min} to {max}")); } - // An angle from -180 to 180 degrees, as text.setRangeStyle stores it. + // An angle from -180 to 180 degrees, as text.setFormat stores it. let n = if key == "rotation" { (n + 180.0).rem_euclid(360.0) - 180.0 } else { n }; Ok(Some(json!(n))) } @@ -265,8 +265,7 @@ fn advanced_attrs( for key in ADVANCED { attrs.remove(*key); } - // A field still as it opened keeps its value below without a check: text in a scaled type - // object can hold a value outside the limits a typed one has. + // A field still as it opened keeps its original value below without a check. let unchanged = |key: &str| !reset && d.fields.get(key) == original_fields.get(key); for key in ADVANCED_NUMBERS { if unchanged(key) { @@ -698,7 +697,7 @@ mod tests { json!({"h_scale": 100.0, "rotation": 0.0, "language": null}), json!({"v_scale": 50.0, "baseline_shift": -3.0, "language": "de"}), json!({"language": "x-file", "size": 12.0}), - // Captured from text in a scaled type object. + // Values a style captures from text in a scaled type object, Size and Leading below 0.1 included. json!({"h_scale": 20000.0, "baseline_shift": 3000.0, "size": 0.05, "leading": 0.05}), ] { let d = dialog_for(original.clone()); @@ -726,10 +725,11 @@ mod tests { #[test] fn advanced_numbers_outside_their_limits_are_errors() { for (key, value, message) in [ - ("h_scale", "0", "Horizontal Scale must be a number from 1 to 10000"), - ("v_scale", "10001", "Vertical Scale must be a number from 1 to 10000"), - ("baseline_shift", "1300", "Baseline Shift must be a number from -1296 to 1296"), - ("baseline_shift", "-1300", "Baseline Shift must be a number from -1296 to 1296"), + ("h_scale", "0", "Horizontal Scale must be a number above 0 and at most 4000000"), + ("h_scale", "-5", "Horizontal Scale must be a number above 0 and at most 4000000"), + ("v_scale", "4000001", "Vertical Scale must be a number above 0 and at most 4000000"), + ("baseline_shift", "4000001", "Baseline Shift must be a number from -4000000 to 4000000"), + ("baseline_shift", "-4000001", "Baseline Shift must be a number from -4000000 to 4000000"), ("rotation", "inf", "Character Rotation must be a number"), ("h_scale", "wide", "Horizontal Scale must be a number"), ] { @@ -737,6 +737,11 @@ mod tests { d.fields.insert(key.into(), json!(value)); assert_eq!(edited_attrs(&d).unwrap_err(), message, "{key} {value}"); } + let mut d = dialog_for(json!({})); + for (key, value) in [("h_scale", "0.5"), ("v_scale", "4000000"), ("baseline_shift", "-4000000"), ("rotation", "-200")] { + d.fields.insert(key.into(), json!(value)); + } + assert_eq!(edited_attrs(&d).unwrap(), attrs(json!({"h_scale": 0.5, "v_scale": 4000000.0, "baseline_shift": -4000000.0, "rotation": 160.0}))); } #[test] diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 40b81c66c..dcc26cdf3 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -5917,6 +5917,7 @@ anchor Points: Punts: Horizontal Scale Escala horitzontal Vertical Scale Escala vertical @msg {label} must be a number from {min} to {max} {label} ha de ser un nombre de {min} a {max} +@msg {label} must be a number above 0 and at most {max} {label} ha de ser un nombre superior a 0 i com a màxim {max} @msg no character style `{name}` No s'ha trobat l'estil de caràcter `{name}` # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index f57132421..18b26838a 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -5929,6 +5929,7 @@ anchor Points: Body: Horizontal Scale Vodorovná změna velikosti Vertical Scale Svislá změna velikosti @msg {label} must be a number from {min} to {max} {label} musí být číslo od {min} do {max} +@msg {label} must be a number above 0 and at most {max} {label} musí být číslo větší než 0 a nejvýše {max} @msg no character style `{name}` styl znaků `{name}` neexistuje # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 90963b31a..c47af8415 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -5514,6 +5514,7 @@ anchor Points: Punkte: Horizontal Scale Horizontale Skalierung Vertical Scale Vertikale Skalierung @msg {label} must be a number from {min} to {max} {label} muss eine Zahl von {min} bis {max} sein +@msg {label} must be a number above 0 and at most {max} {label} muss eine Zahl über 0 und höchstens {max} sein @msg no character style `{name}` Zeichenformat `{name}` nicht gefunden # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index d4b388d48..e7e2f4ec7 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -5880,6 +5880,7 @@ anchor Points: Σημεία: Horizontal Scale Οριζόντια κλίμακα Vertical Scale Κατακόρυφη κλίμακα @msg {label} must be a number from {min} to {max} Το {label} πρέπει να είναι αριθμός από {min} έως {max} +@msg {label} must be a number above 0 and at most {max} Το {label} πρέπει να είναι αριθμός μεγαλύτερος από 0 και έως {max} @msg no character style `{name}` Δεν βρέθηκε το στυλ χαρακτήρων `{name}` # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index dd198f707..4a102b8e9 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -5871,6 +5871,7 @@ anchor Points: Puntos: Horizontal Scale Escala horizontal Vertical Scale Escala vertical @msg {label} must be a number from {min} to {max} {label} debe ser un número de {min} a {max} +@msg {label} must be a number above 0 and at most {max} {label} debe ser un número mayor que 0 y como máximo {max} @msg no character style `{name}` No existe el estilo de carácter `{name}` # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 3ac6c0374..f0133e1fd 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -5959,6 +5959,7 @@ anchor Points: Pisteet: Horizontal Scale Vaakaskaalaus Vertical Scale Pystyskaalaus @msg {label} must be a number from {min} to {max} {label} on oltava luku {min} ja {max} väliltä +@msg {label} must be a number above 0 and at most {max} {label} on oltava luku, joka on yli 0 ja enintään {max} @msg no character style `{name}` Merkkityyliä `{name}` ei löytynyt # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 4eb77eca7..c8dead30f 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -5926,6 +5926,7 @@ anchor Points: Points : Horizontal Scale Mise à l’échelle horizontale Vertical Scale Échelle verticale @msg {label} must be a number from {min} to {max} {label} doit être un nombre compris entre {min} et {max} +@msg {label} must be a number above 0 and at most {max} {label} doit être un nombre supérieur à 0 et au plus égal à {max} @msg no character style `{name}` Style de caractère `{name}` introuvable # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 89572c35f..e978c4be5 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -5915,6 +5915,7 @@ anchor Points: Pontok: Horizontal Scale Vízszintes méretezés Vertical Scale Függőleges méretezés @msg {label} must be a number from {min} to {max} {label} {min} és {max} közötti szám kell legyen +@msg {label} must be a number above 0 and at most {max} {label} 0-nál nagyobb és legfeljebb {max} értékű szám kell legyen @msg no character style `{name}` A(z) `{name}` karakterstílus nem található # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 2811e559b..474ead3c9 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -5548,6 +5548,7 @@ anchor Points: Punti: Horizontal Scale Scala orizzontale Vertical Scale Scala verticale @msg {label} must be a number from {min} to {max} {label} deve essere un numero da {min} a {max} +@msg {label} must be a number above 0 and at most {max} {label} deve essere un numero maggiore di 0 e al massimo {max} @msg no character style `{name}` Stile di carattere `{name}` non trovato # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index d9fd28b46..321befe60 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -5615,6 +5615,7 @@ anchor Points: ポイント: Horizontal Scale 水平比率 Vertical Scale 垂直比率 @msg {label} must be a number from {min} to {max} {label} には {min} から {max} までの数値を指定してください +@msg {label} must be a number above 0 and at most {max} {label} には 0 より大きく {max} 以下の数値を指定してください @msg no character style `{name}` 文字スタイル `{name}` が見つかりません # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index eec5b1f5c..78240b56f 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -5917,6 +5917,7 @@ anchor Points: წერტილები: Horizontal Scale ჰორიზონტალური მასშტაბი Vertical Scale ვერტიკალური მასშტაბი @msg {label} must be a number from {min} to {max} {label} უნდა იყოს რიცხვი {min}-დან {max}-მდე +@msg {label} must be a number above 0 and at most {max} {label} უნდა იყოს 0-ზე მეტი და არაუმეტეს {max}-ისა რიცხვი @msg no character style `{name}` სიმბოლოს სტილი `{name}` ვერ მოიძებნა # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index cbd4f40e3..0518295a4 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -5511,6 +5511,7 @@ anchor Points: 포인트: Horizontal Scale 가로 비율 Vertical Scale 세로 비율 @msg {label} must be a number from {min} to {max} {label}은(는) {min}에서 {max} 사이의 숫자여야 합니다 +@msg {label} must be a number above 0 and at most {max} {label}은(는) 0 초과 {max} 이하의 숫자여야 합니다 @msg no character style `{name}` 문자 스타일 `{name}`을 찾을 수 없습니다 # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 71c9c91d0..23ca0d0ea 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -5783,6 +5783,7 @@ anchor Points: Punkty: Horizontal Scale Skala pozioma Vertical Scale Skala pionowa @msg {label} must be a number from {min} to {max} {label} musi być liczbą od {min} do {max} +@msg {label} must be a number above 0 and at most {max} {label} musi być liczbą większą od 0 i nie większą niż {max} @msg no character style `{name}` Nie znaleziono stylu znakowego `{name}` # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index ee1c15e45..152b931e9 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -5845,6 +5845,7 @@ anchor Points: Pontos: Horizontal Scale Escala Horizontal Vertical Scale Escala Vertical @msg {label} must be a number from {min} to {max} {label} deve ser um número de {min} a {max} +@msg {label} must be a number above 0 and at most {max} {label} deve ser um número maior que 0 e no máximo {max} @msg no character style `{name}` Estilo de caractere `{name}` não encontrado # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 4e19439ed..be893970f 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -5906,6 +5906,7 @@ anchor Points: Точки: Horizontal Scale Масштаб по горизонтали Vertical Scale Масштаб по вертикали @msg {label} must be a number from {min} to {max} {label} должно быть числом от {min} до {max} +@msg {label} must be a number above 0 and at most {max} {label} должно быть числом больше 0 и не более {max} @msg no character style `{name}` Стиль символов `{name}` не найден # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index bdf729b13..1426e7e5a 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -5981,6 +5981,7 @@ shape Open Öppen Horizontal Scale Horisontell skala Vertical Scale Vertikal skala @msg {label} must be a number from {min} to {max} {label} måste vara ett tal från {min} till {max} +@msg {label} must be a number above 0 and at most {max} {label} måste vara ett tal över 0 och högst {max} @msg no character style `{name}` Teckenformatet `{name}` hittades inte # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index a0b1ea804..4f12e77d0 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -5886,6 +5886,7 @@ anchor Points: Noktalar: Horizontal Scale Yatay Ölçek Vertical Scale Dikey Ölçek @msg {label} must be a number from {min} to {max} {label} {min} ile {max} arasında bir sayı olmalıdır +@msg {label} must be a number above 0 and at most {max} {label} 0'ın üzerinde ve en fazla {max} olan bir sayı olmalıdır @msg no character style `{name}` `{name}` karakter stili bulunamadı # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 27178dff9..f0f7b333b 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -5528,6 +5528,7 @@ anchor Points: Точки: Horizontal Scale Масштаб по горизонталі Vertical Scale Масштаб за вертикаллю @msg {label} must be a number from {min} to {max} {label} має бути числом від {min} до {max} +@msg {label} must be a number above 0 and at most {max} {label} має бути числом більше 0 і не більше {max} @msg no character style `{name}` Стиль символів `{name}` не знайдено # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index c8434fa7a..c6c740617 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -5531,6 +5531,7 @@ anchor Points: Điểm: Horizontal Scale Tỷ lệ ngang Vertical Scale Tỷ lệ dọc @msg {label} must be a number from {min} to {max} {label} phải là một số từ {min} đến {max} +@msg {label} must be a number above 0 and at most {max} {label} phải là một số lớn hơn 0 và tối đa {max} @msg no character style `{name}` Không tìm thấy kiểu ký tự `{name}` # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 323253f55..b260148aa 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -5772,6 +5772,7 @@ anchor Points: 点: Horizontal Scale 水平缩放 Vertical Scale 垂直缩放 @msg {label} must be a number from {min} to {max} {label} 必须是 {min} 到 {max} 之间的数字 +@msg {label} must be a number above 0 and at most {max} {label} 必须是大于 0 且不超过 {max} 的数字 @msg no character style `{name}` 找不到字符样式 `{name}` # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index df245b952..808b6a708 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -5568,6 +5568,7 @@ anchor Points: 點: Horizontal Scale 水平縮放 Vertical Scale 垂直縮放 @msg {label} must be a number from {min} to {max} {label} 必須是 {min} 到 {max} 之間的數字 +@msg {label} must be a number above 0 and at most {max} {label} 必須是大於 0 且不超過 {max} 的數字 @msg no character style `{name}` 找不到字元樣式 `{name}` # Color Effects add-on: Duotone (Effect › Color Effects) and Print Ink Fixes (Object › Plug-ins › Color Effects). diff --git a/docs/mcp.md b/docs/mcp.md index 7731a2ddc..760ce7071 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -5299,8 +5299,8 @@ dialog exposes `name`, `font_family`, `font_style`, `size`, `leading`, `kerning` `position`, `underline`, `strikethrough`, `charAlign`, `h_scale`, `v_scale`, `baseline_shift`, `rotation`, `language`, `section` (`general`, `basic` or `advanced`), 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 +Advanced Character Formats holds `h_scale` and `v_scale` (percent, above 0 and at most 4000000), +`baseline_shift` (points, -4000000 to 4000000), `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. diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 648993a12..8be75c5c1 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -502,7 +502,7 @@ since 2026-10-01. - **OpenType SVG colour fonts:** each glyph's SVG document is read by the SVG importer (registered by the engine) into vector art in the run's colours, then drawn, exported and outlined as COLR glyphs are; PDF real text writes them as text that draws nothing and draws their art where they sit. Measured by `tests_svg_glyphs`, `svg/tests/it/svg_glyphs.rs`, `tests_colourfonts::create_outlines_turns_svg_glyphs_into_groups`, `tests_colourfonts::pdf_real_text_draws_svg_glyphs_as_art_and_keeps_their_characters`. Scores unchanged (estimated). - **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 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 10000%), Baseline Shift (-1296 pt to 1296 pt), Character Rotation 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) ("Adjust the Horizontal and Vertical Scale, Baseline Shift, Character Rotation, and Language options"). +- **Character Style Options, Advanced Character Formats:** Character Style Options and New Character Style set a style's Horizontal Scale and Vertical Scale (above 0% and at most 4,000,000%), Baseline Shift (-4,000,000 pt to 4,000,000 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) ("Adjust the Horizontal and Vertical Scale, Baseline Shift, Character Rotation, and Language options"). - **Text styles redefined to the defaults:** New and Redefine Character Style and Paragraph Style capture every attribute of the selected text, including those at their defaults (Auto kerning, Roman baseline alignment, the default Hyphenation options, the Every-line Composer, no tab stops), and `charStyle.setAttrs` and `paraStyle.setAttrs` keep an attribute set to its default value. After a redefinition, text whose value still equals the old definition's takes the new value, a default included; local overrides stay, and text that still has the old value of an attribute the new definition leaves out goes back to the Normal style's value. The style panels show "+" only where the text differs from its style, including type with Auto alignment. Public reference: [Character and paragraph styles](https://web.archive.org/web/20260825113735/https://helpx.adobe.com/illustrator/using/character-paragraph-styles.html). - **Text styles dragged onto the panel's buttons:** a style dragged from the Character Styles or Paragraph Styles panel onto Create New Style is copied (`charStyle.duplicate`, `paraStyle.duplicate`, which name the copy ` copy`) and the copy is highlighted; dragged onto Delete it is deleted (`charStyle.delete`, `paraStyle.delete`); the Normal style is not deleted. Each drop is one undo step. Public reference: [Character and paragraph styles](https://web.archive.org/web/20261015081534/https://helpx.adobe.com/illustrator/using/character-paragraph-styles.html). - **Auto Leading outside the layout:** a paragraph's Justification… › Auto Leading () also sets the Leading the Character panel shows for Auto type (blank where the selected paragraphs differ), the leading the Alt+↑/↓ nudge (`type.step`) steps from, each paragraph's own, and the lines Fill with Placeholder Text counts in area type. Evidence: `ParaStyle::effective_leading` (`crates/doc/src/text.rs` test `paragraph_effective_leading_follows_auto_leading`), `tests_prefs::auto_leading_steps_and_fills_from_the_paragraph_auto_leading`, `panels::character` test `leading_field_shows_the_paragraph_auto_leading`.