From b435c97e50524a2cd4ff63d596e79447daba6bb4 Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Wed, 4 Nov 2026 02:56:59 +0530 Subject: [PATCH 1/5] Fix #4943: Sanskrit, Nepali, Assamese, Konkani and Sindhi languages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document Setup's language list, and with it the Character panel's and Character Style Options' Language menus and text.setFormat / document.setup, gains Sanskrit (sa), Nepali (ne), Assamese (as), Konkani (kok) and Sindhi (sd). Their quote marks are CLDR's: none of the five has delimiters of its own, so they inherit root's “…” and ‘…’. Each catalog gets the five names from CLDR's language names. Co-Authored-By: Claude Opus 5.5 --- crates/doc/src/setup.rs | 19 +++++++++++++++++++ crates/engine/src/tests/docsetup.rs | 21 +++++++++++++++++++++ crates/ui-egui/src/i18n/bg.tsv | 5 +++++ crates/ui-egui/src/i18n/bs.tsv | 5 +++++ crates/ui-egui/src/i18n/ca.tsv | 5 +++++ crates/ui-egui/src/i18n/cs.tsv | 5 +++++ crates/ui-egui/src/i18n/da.tsv | 5 +++++ crates/ui-egui/src/i18n/de.tsv | 5 +++++ crates/ui-egui/src/i18n/el.tsv | 5 +++++ crates/ui-egui/src/i18n/es.tsv | 5 +++++ crates/ui-egui/src/i18n/fi.tsv | 5 +++++ crates/ui-egui/src/i18n/fr.tsv | 5 +++++ crates/ui-egui/src/i18n/hu.tsv | 5 +++++ crates/ui-egui/src/i18n/id.tsv | 5 +++++ crates/ui-egui/src/i18n/it.tsv | 5 +++++ crates/ui-egui/src/i18n/ja.tsv | 5 +++++ crates/ui-egui/src/i18n/ka.tsv | 5 +++++ crates/ui-egui/src/i18n/ko.tsv | 5 +++++ crates/ui-egui/src/i18n/nl.tsv | 5 +++++ crates/ui-egui/src/i18n/pl.tsv | 5 +++++ crates/ui-egui/src/i18n/pt-br.tsv | 5 +++++ crates/ui-egui/src/i18n/ru.tsv | 5 +++++ crates/ui-egui/src/i18n/sv.tsv | 5 +++++ crates/ui-egui/src/i18n/tr.tsv | 5 +++++ crates/ui-egui/src/i18n/uk.tsv | 5 +++++ crates/ui-egui/src/i18n/vi.tsv | 5 +++++ crates/ui-egui/src/i18n/zh-hans.tsv | 5 +++++ crates/ui-egui/src/i18n/zh-hant.tsv | 5 +++++ docs/type-parity.md | 5 +++-- 29 files changed, 173 insertions(+), 2 deletions(-) diff --git a/crates/doc/src/setup.rs b/crates/doc/src/setup.rs index c269181536..706ff42bd1 100644 --- a/crates/doc/src/setup.rs +++ b/crates/doc/src/setup.rs @@ -186,6 +186,15 @@ pub const LANGUAGES: &[(&str, &str, Quotes)] = &[ ("Malayalam", "ml", Quotes::ENGLISH), ("Odia", "or", Quotes::ENGLISH), ("Urdu", "ur", Quotes::ENGLISH), + // “…” outside, ‘…’ inside: CLDR gives these no delimiters of their own (`↑↑↑`, inherited), so + // they take root's (https://github.com/unicode-org/cldr/blob/main/common/main/root.xml, + // `delimiters`): sa.xml, ne.xml, as.xml, kok.xml and sd.xml (Arabic script; sd_Deva.xml for + // Devanagari inherits too) in https://github.com/unicode-org/cldr/blob/main/common/main/. + ("Sanskrit", "sa", Quotes { double: ['“', '”'], single: ['‘', '’'] }), + ("Nepali", "ne", Quotes { double: ['“', '”'], single: ['‘', '’'] }), + ("Assamese", "as", Quotes { double: ['“', '”'], single: ['‘', '’'] }), + ("Konkani", "kok", Quotes { double: ['“', '”'], single: ['‘', '’'] }), + ("Sindhi", "sd", Quotes { double: ['“', '”'], single: ['‘', '’'] }), ]; /// The quotes of a [`LANGUAGES`] entry (case-insensitive). @@ -386,6 +395,11 @@ mod tests { assert_eq!(char_language("sr-latn"), Ok(Some("sr-Latn"))); assert_eq!(char_language("Croatian"), Ok(Some("hr"))); assert_eq!(char_language_name(Some("sr-Cyrl")), Some("Serbian: Cyrillic")); + // Sanskrit, Nepali, Assamese, Konkani (a three-letter tag) and Sindhi, by name or tag. + for (name, tag) in [("Sanskrit", "sa"), ("Nepali", "ne"), ("Assamese", "as"), ("Konkani", "kok"), ("Sindhi", "sd")] { + assert_eq!((char_language(name), char_language(&tag.to_uppercase())), (Ok(Some(tag)), Ok(Some(tag))), "{name}"); + assert_eq!(char_language_name(Some(tag)), Some(name)); + } // Every entry has a tag of its own, and a name of its own. for (i, (n, t, _)) in LANGUAGES.iter().enumerate() { assert!(LANGUAGES.iter().skip(i + 1).all(|(n2, t2, _)| n2 != n && t2 != t), "{n} {t}"); @@ -409,6 +423,11 @@ mod tests { } let mut prev = None; assert_eq!(language_quotes("croatian").unwrap().apply("\"a 'b' c\"", &mut prev), "„a ‚b‘ c“"); + // Sanskrit, Nepali, Assamese, Konkani and Sindhi take CLDR root's quotes. + for name in ["Sanskrit", "Nepali", "Assamese", "Konkani", "Sindhi"] { + let mut prev = None; + assert_eq!(language_quotes(name).unwrap().apply("\"a 'b' c\"", &mut prev), "“a ‘b’ c”", "{name}"); + } // Converting in pieces keeps the context. let mut prev = None; let a = Quotes::ENGLISH.apply("\"", &mut prev); diff --git a/crates/engine/src/tests/docsetup.rs b/crates/engine/src/tests/docsetup.rs index c1c70ac07e..a7ae320b0e 100644 --- a/crates/engine/src/tests/docsetup.rs +++ b/crates/engine/src/tests/docsetup.rs @@ -162,6 +162,27 @@ fn language_picks_its_quotes_unless_quotes_are_given() { assert_eq!((setup(&s).quotes.double, setup(&s).quotes.single), (['“', '”'], ['‹', '›'])); } +/// Sanskrit, Nepali, Assamese, Konkani and Sindhi (#4943): each is a document language, new type +/// takes its tag, and each can be set on a text by name or tag. +#[test] +fn the_further_indian_languages_are_document_and_text_languages() { + let mut s = session(); + let id = create_text(&mut s, "a"); + for (name, tag) in [("Sanskrit", "sa"), ("Nepali", "ne"), ("Assamese", "as"), ("Konkani", "kok"), ("Sindhi", "sd")] { + s.execute("document.setup", &json!({"language": name.to_lowercase()})).unwrap(); + assert_eq!((setup(&s).language.as_str(), setup(&s).quotes.double), (name, ['“', '”'])); + let new = create_text(&mut s, "b"); + assert_eq!(text(&s, new).runs[0].style.language.as_deref(), Some(tag), "new type in {name}"); + s.execute("document.setup", &json!({"language": "English: USA"})).unwrap(); + s.execute("select.set", &json!({"ids": [id.0]})).unwrap(); + s.execute("text.setFormat", &json!({"language": name})).unwrap(); + assert_eq!(text(&s, id).runs[0].style.language.as_deref(), Some(tag), "{name} by name"); + s.execute("text.setFormat", &json!({"language": "English: USA"})).unwrap(); + s.execute("text.setFormat", &json!({"language": tag.to_uppercase()})).unwrap(); + assert_eq!(text(&s, id).runs[0].style.language.as_deref(), Some(tag), "{name} by tag"); + } +} + #[test] fn typographers_quotes_setting_changes_typed_quotes() { let mut s = session(); diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index e0b4646714..6b724d6d34 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -6087,6 +6087,11 @@ breakText Glyphs Глифи Malayalam Малаялам Odia Ория Urdu Урду + Sanskrit Санскрит + Nepali Непалски + Assamese Асамски + Konkani Конкани + Sindhi Синдхи VectorCraft {release} and later (version {n}) VectorCraft {release} и по-нови (версия {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Експортиране на всички отворени документи като PDF diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 0a730a8bb6..307fb47a38 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -6121,6 +6121,11 @@ shape Open Otvoren Malayalam Malajalam Odia Odija Urdu Urdu + Sanskrit Sanskrit + Nepali Nepalski + Assamese Asamski + Konkani Konkani + Sindhi Sindi VectorCraft {release} and later (version {n}) VectorCraft {release} i novije (verzija {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Izvezi sve otvorene dokumente kao PDF diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index c54c8b11de..20ae695935 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -6221,6 +6221,11 @@ breakText Glyphs Glifs Malayalam Malaiàlam Odia Oriya Urdu Urdú + Sanskrit Sànscrit + Nepali Nepalès + Assamese Assamès + Konkani Concani + Sindhi Sindi VectorCraft {release} and later (version {n}) VectorCraft {release} i posteriors (versió {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Exporta tots els documents oberts com a PDF diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 3e535f31d7..e4189b03b3 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -6235,6 +6235,11 @@ breakText Glyphs Glyfy Malayalam Malajálamština Odia Urijština Urdu Urdština + Sanskrit Sanskrt + Nepali Nepálština + Assamese Ásámština + Konkani Konkánština + Sindhi Sindhština VectorCraft {release} and later (version {n}) VectorCraft {release} a novější (verze {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Exportovat všechny otevřené dokumenty jako PDF diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index dd3b54a4e2..d2fb1349fb 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -6103,6 +6103,11 @@ breakText Glyphs Glyffer Malayalam Malayalam Odia Oriya Urdu Urdu + Sanskrit Sanskrit + Nepali Nepalesisk + Assamese Assamesisk + Konkani Konkani + Sindhi Sindhi VectorCraft {release} and later (version {n}) VectorCraft {release} og nyere (version {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Eksportér alle åbne dokumenter som PDF diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 4956d08d4c..1ddf569dd0 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -5821,6 +5821,11 @@ breakText Glyphs Glyphen Malayalam Malayalam Odia Oriya Urdu Urdu + Sanskrit Sanskrit + Nepali Nepalesisch + Assamese Assamesisch + Konkani Konkani + Sindhi Sindhi VectorCraft {release} and later (version {n}) VectorCraft {release} und neuer (Version {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Alle geöffneten Dokumente als PDF exportieren diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index d73cddb44b..e70bf28df2 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -6187,6 +6187,11 @@ breakText Glyphs Γλύφοι Malayalam Μαλαγιάλαμ Odia Όντια Urdu Ούρντου + Sanskrit Σανσκριτικά + Nepali Νεπαλικά + Assamese Ασαμικά + Konkani Κονκανικά + Sindhi Σίντι VectorCraft {release} and later (version {n}) VectorCraft {release} και νεότερες (έκδοση {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Εξαγωγή όλων των ανοιχτών εγγράφων ως PDF diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index b43199c7e9..c9e1ee76e1 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -6177,6 +6177,11 @@ breakText Glyphs Glifos Malayalam Malayálam Odia Oriya Urdu Urdu + Sanskrit Sánscrito + Nepali Nepalí + Assamese Asamés + Konkani Konkaní + Sindhi Sindi VectorCraft {release} and later (version {n}) VectorCraft {release} y posteriores (versión {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Exportar todos los documentos abiertos como PDF diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index b211b4c481..0b9f9994db 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -6265,6 +6265,11 @@ breakText Glyphs Merkit Malayalam Malajalam Odia Orija Urdu Urdu + Sanskrit Sanskrit + Nepali Nepali + Assamese Assami + Konkani Konkani + Sindhi Sindhi VectorCraft {release} and later (version {n}) VectorCraft {release} ja uudemmat (versio {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Vie kaikki avoimet asiakirjat PDF-muodossa diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index d80d26230d..a675037940 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -6230,6 +6230,11 @@ breakText Glyphs Glyphes Malayalam Malayalam Odia Odia Urdu Ourdou + Sanskrit Sanskrit + Nepali Népalais + Assamese Assamais + Konkani Konkani + Sindhi Sindhi VectorCraft {release} and later (version {n}) VectorCraft {release} et ultérieures (version {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Exporter tous les documents ouverts en PDF diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 5e5fae2043..a9d7f1615f 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -6219,6 +6219,11 @@ breakText Glyphs Glifák Malayalam Malajálam Odia Odia Urdu Urdu + Sanskrit Szanszkrit + Nepali Nepáli + Assamese Asszámi + Konkani Konkani + Sindhi Szindhi VectorCraft {release} and later (version {n}) VectorCraft {release} és újabb (verzió: {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Az összes megnyitott dokumentum exportálása PDF-ként diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 987d8db0de..b18b2e5bc4 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -6103,6 +6103,11 @@ breakText Glyphs Glif Malayalam Malayalam Odia Oriya Urdu Urdu + Sanskrit Sanskerta + Nepali Nepali + Assamese Assam + Konkani Konkani + Sindhi Sindhi VectorCraft {release} and later (version {n}) VectorCraft {release} dan yang lebih baru (versi {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Ekspor Semua Dokumen Terbuka sebagai PDF diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 1f43f530ba..7dca688024 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -5855,6 +5855,11 @@ breakText Glyphs Glifi Malayalam Malayalam Odia Odia Urdu Urdu + Sanskrit Sanscrito + Nepali Nepalese + Assamese Assamese + Konkani Konkani + Sindhi Sindhi VectorCraft {release} and later (version {n}) VectorCraft {release} e successive (versione {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Esporta tutti i documenti aperti come PDF diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 6c3b728695..0f09328eb7 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -5920,6 +5920,11 @@ breakText Glyphs 字形 Malayalam マラヤーラム語 Odia オディア語 Urdu ウルドゥー語 + Sanskrit サンスクリット語 + Nepali ネパール語 + Assamese アッサム語 + Konkani コンカニ語 + Sindhi シンド語 VectorCraft {release} and later (version {n}) VectorCraft {release} 以降 (バージョン {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF 開いているすべてのドキュメントを PDF として書き出し diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index f85b3bcd5c..3961398aeb 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -6223,6 +6223,11 @@ breakText Glyphs გლიფები Malayalam მალაიალამური Odia ორია Urdu ურდუ + Sanskrit სანსკრიტი + Nepali ნეპალური + Assamese ასამური + Konkani კონკანი + Sindhi სინდჰური VectorCraft {release} and later (version {n}) VectorCraft {release} და უფრო ახალი (ვერსია {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF ყველა ღია დოკუმენტის ექსპორტი PDF-ად diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 7a83c0316e..5130834fa4 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -5816,6 +5816,11 @@ breakText Glyphs 글리프 Malayalam 말라얄람어 Odia 오리야어 Urdu 우르두어 + Sanskrit 산스크리트어 + Nepali 네팔어 + Assamese 아삼어 + Konkani 코카니어 + Sindhi 신디어 VectorCraft {release} and later (version {n}) VectorCraft {release} 이상 (버전 {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF 열린 모든 문서를 PDF로 내보내기 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 8d1deb5043..a173a8e423 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -6147,6 +6147,11 @@ breakText Glyphs Glyphs Malayalam Malayalam Odia Odia Urdu Urdu + Sanskrit Sanskriet + Nepali Nepalees + Assamese Assamees + Konkani Konkani + Sindhi Sindhi VectorCraft {release} and later (version {n}) VectorCraft {release} en nieuwer (versie {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Alle geopende documenten exporteren als PDF diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index c3ba696532..ecbe665946 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -6090,6 +6090,11 @@ breakText Glyphs Glify Malayalam Malajalam Odia Orija Urdu Urdu + Sanskrit Sanskryt + Nepali Nepalski + Assamese Asamski + Konkani Konkani + Sindhi Sindhi VectorCraft {release} and later (version {n}) VectorCraft {release} i nowsze (wersja {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Eksportuj wszystkie otwarte dokumenty jako PDF diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index e0af75dda4..6299441a8a 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -6153,6 +6153,11 @@ breakText Glyphs Glifos Malayalam Malaiala Odia Oriá Urdu Urdu + Sanskrit Sânscrito + Nepali Nepalês + Assamese Assamês + Konkani Concani + Sindhi Sindi VectorCraft {release} and later (version {n}) VectorCraft {release} e posteriores (versão {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Exportar todos os documentos abertos como PDF diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index b37b9a3193..ac2d32b02c 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -6212,6 +6212,11 @@ breakText Glyphs Глифы Malayalam Малаялам Odia Ория Urdu Урду + Sanskrit Санскрит + Nepali Непальский + Assamese Ассамский + Konkani Конкани + Sindhi Синдхи VectorCraft {release} and later (version {n}) VectorCraft {release} и новее (версия {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Экспортировать все открытые документы в PDF diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index ab678406c1..272f50d8d6 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -6287,6 +6287,11 @@ breakText Glyphs Glyfer Malayalam Malayalam Odia Oriya Urdu Urdu + Sanskrit Sanskrit + Nepali Nepalesiska + Assamese Assamesiska + Konkani Konkani + Sindhi Sindhi VectorCraft {release} and later (version {n}) VectorCraft {release} och senare (version {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Exportera alla öppna dokument som PDF diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 78ffc5ae73..44548ec610 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -6192,6 +6192,11 @@ breakText Glyphs Glifler Malayalam Malayalam dili Odia Oriya dili Urdu Urduca + Sanskrit Sanskrit + Nepali Nepalce + Assamese Assamca + Konkani Konkani dili + Sindhi Sindhi dili VectorCraft {release} and later (version {n}) VectorCraft {release} ve sonrası (sürüm {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Tüm Açık Belgeleri PDF Olarak Dışa Aktar diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 87a8a1a612..a7b16b1023 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -5835,6 +5835,11 @@ breakText Glyphs Гліфи Malayalam Малаялам Odia Одія Urdu Урду + Sanskrit Санскрит + Nepali Непальська + Assamese Ассамська + Konkani Конкані + Sindhi Синдхі VectorCraft {release} and later (version {n}) VectorCraft {release} і новіші (версія {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Експортувати всі відкриті документи як PDF diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 3856eef442..8c51ea2423 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -5836,6 +5836,11 @@ breakText Glyphs Glyph Malayalam Tiếng Malayalam Odia Tiếng Odia Urdu Tiếng Urdu + Sanskrit Tiếng Phạn + Nepali Tiếng Nepal + Assamese Tiếng Assam + Konkani Tiếng Konkani + Sindhi Tiếng Sindhi VectorCraft {release} and later (version {n}) VectorCraft {release} trở lên (phiên bản {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF Xuất tất cả tài liệu đang mở dưới dạng PDF diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 78542f8a25..5751d4c5ba 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -6076,6 +6076,11 @@ breakText Glyphs 字形 Malayalam 马拉雅拉姆语 Odia 奥里亚语 Urdu 乌尔都语 + Sanskrit 梵语 + Nepali 尼泊尔语 + Assamese 阿萨姆语 + Konkani 孔卡尼语 + Sindhi 信德语 VectorCraft {release} and later (version {n}) VectorCraft {release} 及更高版本 (版本 {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF 将所有打开的文档导出为 PDF diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index a7bcd23d81..8a42734867 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -5873,6 +5873,11 @@ breakText Glyphs 字符 Malayalam 馬來亞拉姆文 Odia 歐利亞文 Urdu 烏都文 + Sanskrit 梵文 + Nepali 尼泊爾文 + Assamese 阿薩姆文 + Konkani 貢根文 + Sindhi 信德文 VectorCraft {release} and later (version {n}) VectorCraft {release} 及更新版本 (版本 {n}) # Document Tools add-on: Export All Open Documents (#4920). Export All Open Documents as PDF 將所有開啟的文件匯出為 PDF diff --git a/docs/type-parity.md b/docs/type-parity.md index 5e506c2360..5ec0ef53a2 100644 --- a/docs/type-parity.md +++ b/docs/type-parity.md @@ -1,6 +1,6 @@ # Type parity -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-03 · **Change:** minor (Touch Type moves right-to-left characters along their line; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-04 · **Change:** minor (Sanskrit, Nepali, Assamese, Konkani and Sindhi in the language list; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) Type is Illustrator's largest single area by use (weight 13 of 105 across "Type core" and "Type advanced" in [target-app-parity.md](target-app-parity.md)). This checklist lists the features one by one. Status is from the @@ -65,7 +65,7 @@ against Illustrator's public documentation; **estimated** unless noted. | CJK: manual tate-chu-yoko | done | Character panel menu › Tate-chu-yoko (`text.setFormat` / `text.setRangeStyle {tateChuYoko}`), with Show East Asian Options: marked characters stand side by side across one em of a vertical column, squeezed to the em when wider; two or three half-width digits still do so without the mark; horizontal type keeps the mark and does not move them. Tate-chu-yoko Settings… (`ui.tateChuYokoSettings`, `{tcyUpDown, tcyLeftRight}` in points) moves a marked block up or down and right or left as one piece. Evidence: `tests_vertical::manual_tate_chu_yoko_sets_marked_characters_across_one_em`, `tests_vertical::tate_chu_yoko_settings_move_a_marked_block_up_down_left_and_right`, `typecmd::tate_chu_yoko_is_a_character_attribute_saved_only_when_on`, `typecmd::tate_chu_yoko_settings_are_character_attributes_saved_only_when_set`, `dialogs::tate_chu_yoko::tests` | | CJK: Standard Vertical Roman Alignment | done | Character panel menu › Standard Vertical Roman Alignment (`text.setFormat` / `text.setRangeStyle {standardVerticalRoman}`), with Show East Asian Options, off by default: in vertical type the marked half-width characters (Latin letters, digits and other characters that would lie on their side) stand upright one below the other, each in its upright cell; spaces keep their width and tate-chu-yoko blocks stay across the column; horizontal type keeps the mark and does not change. Character Style Options has its own checkbox for it. Evidence: `tests_vertical::standard_vertical_roman_alignment_stands_half_width_characters_upright`, `typecmd::standard_vertical_roman_is_a_character_attribute_saved_only_when_on` | | CJK: ruby, manual tate-chu-yoko | partial | ruby (ふりがな) for live text (`type.ruby`): a reading over a byte range, above (right of the column in vertical type) or below, start/centre/end alignment, size, overhang or squeeze; saved natively, laid out with its line growing, drawn on the canvas, in SVG and PDF (as outlines where ruby is present), in EPS, EMF/WMF and legacy `.ai` (legacy `.ai` writes type with ruby as outlines), and kept by Create Outlines, Expand Appearance and flattening, each glyph where the layout puts it (`typecmd::ruby_tests::create_outlines_keeps_the_ruby_where_it_is_laid_out`); manual tate-chu-yoko missing | #633 | -| Language per character (Character panel › Language, character styles), text shaped in it | done | `text.setFormat` / `text.setRangeStyle {language}` by name or BCP 47 tag, one of Document Setup's languages (Hindi, Marathi, Gujarati, Bengali, Punjabi, Tamil, Telugu, Kannada, Malayalam, Odia and Urdu added, #4943; Serbian: Cyrillic, Serbian: Latin and Croatian); the shaper gets the tag, so the font's language forms apply (OpenType `locl`: Turkish keeps `fi` apart and the dot on its i, #4940); new type takes the document's language; saved as the tag only when set, carried by character styles (#4946). Not yet: hyphenation and spelling by it, `.ai`/PDF import of a text's language, paragraph styles. Evidence: `features::tests::language_picks_the_fonts_forms`, `features::tests::serbian_gets_the_fonts_serbian_forms`, `typecmd::area_tests::language_is_a_character_attribute_saved_only_when_set` | +| Language per character (Character panel › Language, character styles), text shaped in it | done | `text.setFormat` / `text.setRangeStyle {language}` by name or BCP 47 tag, one of Document Setup's languages (Hindi, Marathi, Gujarati, Bengali, Punjabi, Tamil, Telugu, Kannada, Malayalam, Odia, Urdu, Sanskrit, Nepali, Assamese, Konkani and Sindhi added, #4943; Serbian: Cyrillic, Serbian: Latin and Croatian); the shaper gets the tag, so the font's language forms apply (OpenType `locl`: Turkish keeps `fi` apart and the dot on its i, #4940); new type takes the document's language; saved as the tag only when set, carried by character styles (#4946). Not yet: hyphenation and spelling by it, `.ai`/PDF import of a text's language, paragraph styles. Evidence: `features::tests::language_picks_the_fonts_forms`, `features::tests::serbian_gets_the_fonts_serbian_forms`, `typecmd::area_tests::language_is_a_character_attribute_saved_only_when_set`, `tests::docsetup::the_further_indian_languages_are_document_and_text_languages` | | No Break | done | Character panel menu (`text.setFormat` / `text.setRangeStyle {noBreak}`): the marked characters stay on one line, including across a space; a run that does not fit after earlier text moves together, and a run longer than the line stays together. Evidence: `layout::wrapping_tests::no_break_keeps_marked_characters_on_one_line`, `tests::no_break_keeps_marked_words_on_one_line`, `typecmd::no_break_is_a_character_attribute_saved_only_when_on` | | CJK: ruby | missing | #633 | | Inline symbols in text | beyond Illustrator | not scored | @@ -77,6 +77,7 @@ Character Styles menu New/Redefine and footer New capture the first selected cha | Date | Change | Summary | |---|---|---| +| 2026-11-04 | minor | Sanskrit (`sa`), Nepali (`ne`), Assamese (`as`), Konkani (`kok`) and Sindhi (`sd`) in the language list (#4943), with “…” and ‘…’, which [CLDR](https://github.com/unicode-org/cldr/blob/main/common/main/) gives them by inheriting [root](https://github.com/unicode-org/cldr/blob/main/common/main/root.xml); scores unchanged | | 2026-11-03 | minor | Character-menu Kashidas controls selected characters separately from the paragraph's Insert Kashidas length. Existing text allows Kashidas by default; scores and estimates unchanged. | | 2026-11-03 | minor | Type on a Path Options has a Preview checkbox: the type follows the fields while it is on, Cancel restores it, OK is one undo step (#5360, as public tutorials of the dialog show); scores and estimates unchanged. | | 2026-11-02 | minor | The wheel over Character, Properties and Control font-family fields changes selected text, one undo step per notch (#5253); scores and estimates unchanged. | From 015eb4e5fc8f471c0cd2fa9895c0dae40949ec35 Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Wed, 4 Nov 2026 10:00:56 +0530 Subject: [PATCH 2/5] #4943: Quotes::ENGLISH for the new languages; ui-parity row As the other Indic rows do (review). The CLDR citation stays: root's delimiters are the English ones. Co-Authored-By: Claude Opus 5.5 --- crates/doc/src/setup.rs | 10 +++++----- docs/ui-parity.md | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/crates/doc/src/setup.rs b/crates/doc/src/setup.rs index 706ff42bd1..2d0a4012ba 100644 --- a/crates/doc/src/setup.rs +++ b/crates/doc/src/setup.rs @@ -190,11 +190,11 @@ pub const LANGUAGES: &[(&str, &str, Quotes)] = &[ // they take root's (https://github.com/unicode-org/cldr/blob/main/common/main/root.xml, // `delimiters`): sa.xml, ne.xml, as.xml, kok.xml and sd.xml (Arabic script; sd_Deva.xml for // Devanagari inherits too) in https://github.com/unicode-org/cldr/blob/main/common/main/. - ("Sanskrit", "sa", Quotes { double: ['“', '”'], single: ['‘', '’'] }), - ("Nepali", "ne", Quotes { double: ['“', '”'], single: ['‘', '’'] }), - ("Assamese", "as", Quotes { double: ['“', '”'], single: ['‘', '’'] }), - ("Konkani", "kok", Quotes { double: ['“', '”'], single: ['‘', '’'] }), - ("Sindhi", "sd", Quotes { double: ['“', '”'], single: ['‘', '’'] }), + ("Sanskrit", "sa", Quotes::ENGLISH), + ("Nepali", "ne", Quotes::ENGLISH), + ("Assamese", "as", Quotes::ENGLISH), + ("Konkani", "kok", Quotes::ENGLISH), + ("Sindhi", "sd", Quotes::ENGLISH), ]; /// The quotes of a [`LANGUAGES`] entry (case-insensitive). diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 5499b09aa1..56c1bb1728 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -1,6 +1,6 @@ # UI and interaction parity -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-03 · **Change:** minor (Type on a Path Options has a Preview checkbox, #5360; the Action Options row cites the public Actions panel page; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-04 · **Change:** minor (Document Setup's language list gains Sanskrit, Nepali, Assamese, Konkani and Sindhi, #4943; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) · **Target:** Adobe Illustrator 2026 (30.x) ## Feature submission evidence @@ -420,6 +420,7 @@ separate. Scores and hours unchanged. [Behavior and command details](development | Date | Change | Summary | |---|---|---| +| 2026-11-04 | minor | Document Setup › Language and Character panel › Language: the list gains Sanskrit, Nepali, Assamese, Konkani and Sindhi (#4943), with their names in every catalog from CLDR; scores unchanged | | 2026-11-03 | minor | Enclosing Lasso selects fully enclosed objects with a freehand loop under Object › Plug-ins; scores and estimates unchanged. | | 2026-11-03 | minor | Type on a Path Options has a Preview checkbox (#5360, as public tutorials of the dialog show); scores and estimates unchanged | | 2026-11-02 | minor | Font-family fields in Character, Properties and Control accept the wheel without opening the menu (#5253); scores and estimates unchanged. | From a724fd48e43dc2bd406c839559440ffe30b5ded3 Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Mon, 16 Nov 2026 03:01:50 +0530 Subject: [PATCH 3/5] feat(ui): recolor lab entry and swatch libraries access (#4028) --- crates/ui-egui/src/dialogs/color_picker.rs | 133 ++++++++++++------ .../ui-egui/src/dialogs/color_picker/tests.rs | 11 ++ crates/ui-egui/src/dialogs/recolor.rs | 93 +++++++++++- docs/gaps.md | 3 +- docs/target-app-parity.md | 1 + docs/ui-parity.md | 3 +- 6 files changed, 196 insertions(+), 48 deletions(-) diff --git a/crates/ui-egui/src/dialogs/color_picker.rs b/crates/ui-egui/src/dialogs/color_picker.rs index c4ef1a984d..f86ee17f51 100644 --- a/crates/ui-egui/src/dialogs/color_picker.rs +++ b/crates/ui-egui/src/dialogs/color_picker.rs @@ -16,16 +16,18 @@ use egui::{Rect, Sense, Ui, vec2}; use serde_json::{Value, json}; -use vectorcraft_color::cms::{self, Lab}; +use vectorcraft_color::cms; use vectorcraft_color::{Color, Paint}; use vectorcraft_doc::ColorMode; use vectorcraft_engine::cmd::color_value; +use vectorcraft_engine::cmd::swatchlib; use super::form::PREVIEWED; use super::{DialogAction, DialogSpec}; use crate::panels::color::{ GAMUT_WARNING, WEB_WARNING, gamut_fix, hex_digits, is_web_safe, parse_hex, warning_chip, web_safe, working_hsb, working_rgb, }; +use crate::panels::swatches::{DOCUMENT_SWATCHES, colour_libraries}; use crate::panels::{c32, color_json}; use crate::state::Dialog; use crate::theme::Tokens; @@ -290,11 +292,22 @@ const RECOLOR_ROW: &str = "__recolorRow"; /// The Color Picker over the Recolor Artwork dialog `parent`, on `color`, the new color of row /// `row`: it previews nothing itself, its OK goes back to `parent` with the row's new color set /// ([`super::recolor::with_new_color`]) and its Cancel goes back to `parent` as it was. -pub(super) fn over_recolor(parent: &Dialog, color: Color, row: usize) -> Dialog { - let mut d = Dialog::new( - KIND, - json!({"original": color_json(&color), "channel": Channel::default().id(), "webOnly": false, "swatches": false, RECOLOR_ROW: row}), - ); +/// When `swatches` is true, the picker opens showing the Swatches view. +pub(super) fn over_recolor(parent: &Dialog, color: Color, row: usize, swatches: bool) -> Dialog { + let mut fields = json!({ + "original": color_json(&color), + "channel": Channel::default().id(), + "webOnly": false, + "swatches": swatches, + RECOLOR_ROW: row, + }); + let lib = parent.str("limitTo"); + if !lib.is_empty() + && let Some(object) = fields.as_object_mut() + { + object.insert("library".into(), json!(lib)); + } + let mut d = Dialog::new(KIND, fields); d.fields.insert(super::PARENT.into(), serde_json::to_value(parent).unwrap_or_default()); store(&mut d, &Picked::of(color)); d.fields.insert(crate::screen_color::PICKER_ID.into(), json!(crate::screen_color::picker_id())); @@ -378,10 +391,10 @@ fn body(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog) -> DialogAction { ui.with_layout(layout, |ui| { ui.spacing_mut().item_spacing.x = 0.0; ui.allocate_ui_with_layout(vec2(side + SLIDER_GAP + SLIDER_W, side), egui::Layout::top_down(egui::Align::Min), |ui| { - ui.horizontal_top(|ui| { - if swatches { - pick = swatch_list(app, ui, &p.color, side).map(Picked::of); - } else { + if swatches { + pick = swatch_list(app, ui, d, &p.color, side).map(Picked::of); + } else { + ui.horizontal_top(|ui| { let (z, x, y) = field_pos(channel, &p); let at = |x: f32, y: f32| c32(&field_pick(channel, z, x, y).snapped(web).color); if let (Some((x, y)), _) = @@ -398,8 +411,8 @@ fn body(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog) -> DialogAction { { pick = Some(field_pick(channel, z, x, y)); } - } - }); + }); + } ui.add_space(8.0); if widgets::check(ui, tl!("Only Web Colors"), web, true) { d.fields.insert("webOnly".into(), json!(!web)); @@ -612,7 +625,7 @@ fn value_fields(ui: &mut Ui, p: &Picked, channel: Channel) -> (Option, O edit = Some(Picked::of(if i < 3 { let mut l = [lab.l, lab.a, lab.b]; l[i] = if i == 0 { nv.clamp(0.0, 100.0) } else { nv.clamp(-128.0, 127.0) }; - cms.from_lab(Lab::new(l[0], l[1], l[2])) + Color::lab(l[0], l[1], l[2]) } else { let mut k = cmyk; k[i - 3] = (nv / 100.0).clamp(0.0, 1.0); @@ -626,37 +639,77 @@ fn value_fields(ui: &mut Ui, p: &Picked, channel: Channel) -> (Option, O (edit, chosen) } -/// The document's colour swatches as a list; returns the clicked swatch's colour. -fn swatch_list(app: &VectorcraftApp, ui: &mut Ui, current: &Color, side: f32) -> Option { +/// The document's colour swatches or a swatch library as a list; returns the clicked swatch's colour. +fn swatch_list(app: &VectorcraftApp, ui: &mut Ui, d: &mut Dialog, current: &Color, side: f32) -> Option { let t = Tokens::get(ui.ctx()); let mut chosen = None; - ui.allocate_ui(vec2(side + SLIDER_GAP + SLIDER_W, side), |ui| { - ui.set_min_size(vec2(side + SLIDER_GAP + SLIDER_W, side)); + let list_w = side + SLIDER_GAP + SLIDER_W; + ui.allocate_ui_with_layout(vec2(list_w, side), egui::Layout::top_down(egui::Align::Min), |ui| { + ui.set_min_size(vec2(list_w, side)); + let libs = colour_libraries(app); + let keys: Vec<&str> = [swatchlib::DOCUMENT_SWATCHES].into_iter().chain(libs.iter().map(|l| l.id.as_str())).collect(); + let names: Vec<&str> = [DOCUMENT_SWATCHES].into_iter().chain(libs.iter().map(|l| l.name.as_str())).collect(); + let builtin = |k: usize| k.checked_sub(1).is_none_or(|i| libs.get(i).is_some_and(|l| l.submenu.is_none())); + let shown = super::shown_names(crate::i18n::current(), &names, builtin); + let cur = d.str("library"); + let cur = if cur.is_empty() { swatchlib::DOCUMENT_SWATCHES } else { &cur }; + let at = keys.iter().position(|k| *k == cur).unwrap_or(0); + let current_label = shown.get(at).copied().unwrap_or_default(); + if let Some(i) = widgets::dropdown_names(ui, "cp-library", current_label, &shown, list_w) + && let Some(&k) = keys.get(i) + { + d.fields.insert("library".into(), json!(k)); + } + ui.add_space(4.0); widgets::list_box(ui, |ui| { - egui::ScrollArea::vertical().id_salt("cp-swatches").max_height((side - 8.0).max(1.0)).show(ui, |ui| { - ui.set_width(side + SLIDER_GAP + SLIDER_W - 8.0); - let Some(st) = app.session.active() else { - widgets::dim_label(ui, tl!("Open a document to see its swatches.")); - return; - }; - let doc = &st.doc; - for s in doc.swatches.iter().chain(doc.swatch_groups.iter().flat_map(|g| g.swatches.iter())) { - let Paint::Solid { color, .. } = &s.paint else { continue }; - let (r, resp) = ui.allocate_exact_size(vec2(ui.available_width(), 20.0), Sense::click()); - if resp.hovered() { - ui.painter().rect_filled(r, 0.0, t.hover); + let max_h = (side - 28.0).max(1.0); + egui::ScrollArea::vertical().id_salt("cp-swatches").max_height(max_h).show(ui, |ui| { + ui.set_width(list_w - 8.0); + let cur = d.str("library"); + if cur.is_empty() || cur == swatchlib::DOCUMENT_SWATCHES { + let Some(st) = app.session.active() else { + widgets::dim_label(ui, tl!("Open a document to see its swatches.")); + return; + }; + let doc = &st.doc; + for s in doc.swatches.iter().chain(doc.swatch_groups.iter().flat_map(|g| g.swatches.iter())) { + let Some(color) = s.paint.color() else { continue }; + let (r, resp) = ui.allocate_exact_size(vec2(ui.available_width(), 20.0), Sense::click()); + if resp.hovered() { + ui.painter().rect_filled(r, 0.0, t.hover); + } + let chip = Rect::from_min_size(r.left_center() + vec2(4.0, -7.0), vec2(14.0, 14.0)); + widgets::swatch_tile(ui, chip, &s.paint, color == *current, false); + ui.painter().text( + egui::pos2(chip.right() + 8.0, r.center().y), + egui::Align2::LEFT_CENTER, + &s.name, + egui::FontId::proportional(12.0), + t.text, + ); + if resp.clicked() { + chosen = Some(color); + } } - let chip = Rect::from_min_size(r.left_center() + vec2(4.0, -7.0), vec2(14.0, 14.0)); - widgets::swatch_tile(ui, chip, &s.paint, color == current, false); - ui.painter().text( - egui::pos2(chip.right() + 8.0, r.center().y), - egui::Align2::LEFT_CENTER, - &s.name, - egui::FontId::proportional(12.0), - t.text, - ); - if resp.clicked() { - chosen = Some(*color); + } else if let Some((_, lib)) = swatchlib::library(&app.session, &cur) { + for s in lib.swatches.iter().chain(lib.groups.iter().flat_map(|g| g.swatches.iter())) { + let Some(color) = s.paint.color() else { continue }; + let (r, resp) = ui.allocate_exact_size(vec2(ui.available_width(), 20.0), Sense::click()); + if resp.hovered() { + ui.painter().rect_filled(r, 0.0, t.hover); + } + let chip = Rect::from_min_size(r.left_center() + vec2(4.0, -7.0), vec2(14.0, 14.0)); + widgets::swatch_tile(ui, chip, &s.paint, color == *current, false); + ui.painter().text( + egui::pos2(chip.right() + 8.0, r.center().y), + egui::Align2::LEFT_CENTER, + &s.name, + egui::FontId::proportional(12.0), + t.text, + ); + if resp.clicked() { + chosen = Some(color); + } } } }); diff --git a/crates/ui-egui/src/dialogs/color_picker/tests.rs b/crates/ui-egui/src/dialogs/color_picker/tests.rs index 5587b9c560..a6f9fec640 100644 --- a/crates/ui-egui/src/dialogs/color_picker/tests.rs +++ b/crates/ui-egui/src/dialogs/color_picker/tests.rs @@ -774,3 +774,14 @@ fn compact_picker_shrinks_then_scrolls_without_enlarging_the_window() { assert!(app.ui.dialog.is_none()); } } + +#[test] +fn native_lab_entry_in_color_picker() { + let mut app = app(); + app.run("ui.colorPicker", json!({})).unwrap(); + let d = app.ui.dialog.as_mut().unwrap(); + d.fields.insert("color".into(), json!({"l": 70.0, "a": -25.0, "b": 40.0})); + let p = picked(d); + assert_eq!(p.color, Color::lab(70.0, -25.0, 40.0)); + assert!(matches!(p.color, Color::Lab { .. })); +} diff --git a/crates/ui-egui/src/dialogs/recolor.rs b/crates/ui-egui/src/dialogs/recolor.rs index 238205216e..3ad221a4a1 100644 --- a/crates/ui-egui/src/dialogs/recolor.rs +++ b/crates/ui-egui/src/dialogs/recolor.rs @@ -761,8 +761,11 @@ fn body(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog) -> bool { None => form::preview(app, ui, d, "Recolor Artwork", CMD, apply_params(d)), } } - if let Some(c) = pick.and_then(|i| Some((i, to_color(rows(d).get(i)?)?))) { - *d = super::color_picker::over_recolor(d, c.1, c.0); + if let Some((i, swatches)) = pick + && let Some(row) = rows(d).get(i) + { + let c = to_color(row).or_else(|| from_colors(row).first().copied()).unwrap_or_default(); + *d = super::color_picker::over_recolor(d, c, i, swatches); } false } @@ -830,8 +833,8 @@ fn chip(ui: &Ui, r: Rect, c: Color, dim: bool) { } /// The Assign tab. Returns true when the rows changed, and the row whose new colour was -/// double-clicked. -fn assign_tab(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut Vec) -> (bool, Option) { +/// double-clicked or chosen via "Pick from Swatches" (with `true` for swatches view). +fn assign_tab(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut Vec) -> (bool, Option<(usize, bool)>) { let t = Tokens::get(ui.ctx()); let mut changed = false; let total: usize = rows.iter().map(|r| r["from"].as_array().map_or(0, Vec::len)).sum(); @@ -869,7 +872,8 @@ fn assign_tab(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut }); let mut sel = selection(d); let mut clicked: Option = None; - let mut pick: Option = None; + let mut pick: Option<(usize, bool)> = None; + let mut limit_to: Option = None; let shown: Vec = rows.iter().map(|r| new_shown(app, d, r)).collect(); widgets::list_box(ui, |ui| { egui::ScrollArea::vertical().id_salt("recolor-rows").max_height(TABLE_H).show(ui, |ui| { @@ -912,7 +916,7 @@ fn assign_tab(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut clicked = Some(i); } if nresp.double_clicked() { - pick = Some(i); + pick = Some((i, false)); } ui.add_space(6.0); let hex = crate::panels::color::hex_digits(&to); @@ -923,6 +927,40 @@ fn assign_tab(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut set_to(row, &keep_model(to, c)); changed = true; } + let mut row_menu = |ui: &mut Ui| { + if widgets::menu_item(ui, tl!("Pick from Swatches"), true, false) { + pick = Some((i, true)); + ui.close(); + } + ui.menu_button(tl!("Limit to Library"), |ui| { + let cur = d.str("limitTo"); + if widgets::menu_item(ui, tl!("None"), true, cur.is_empty()) { + limit_to = Some("".to_string()); + ui.close(); + } + ui.separator(); + if let Some(k) = crate::panels::swatches::library_list(app, ui, &cur) { + limit_to = Some(k); + ui.close(); + } + }); + }; + if (cr.secondary_clicked() || nresp.secondary_clicked()) && !sel.contains(&i) { + clicked = Some(i); + } + cr.context_menu(&mut row_menu); + nresp.context_menu(&mut row_menu); + let empty_w = ui.available_width(); + if empty_w > 0.0 { + let (_, empty_resp) = ui.allocate_exact_size(vec2(empty_w, 20.0), Sense::click()); + if empty_resp.clicked() { + clicked = Some(i); + } + if empty_resp.secondary_clicked() && !sel.contains(&i) { + clicked = Some(i); + } + empty_resp.context_menu(&mut row_menu); + } }); if sel.contains(&i) { ui.painter().set(bg, egui::Shape::rect_filled(r.response.rect.expand2(vec2(2.0, 1.0)), 2.0, t.row_selected)); @@ -930,6 +968,10 @@ fn assign_tab(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut } }); }); + if let Some(k) = limit_to { + d.fields.insert("limitTo".into(), json!(k)); + changed = true; + } if let Some(i) = clicked { let m = ui.input(|i| i.modifiers); match sel.iter().position(|s| *s == i) { @@ -1914,6 +1956,45 @@ mod tests { crate::dialogs::confirm(&mut app).unwrap(); let to = super::rows(app.ui.dialog.as_ref().unwrap())[i]["to"].clone(); assert!(to.as_str().is_some_and(|k| k.starts_with("cmyk ")), "a color picked as RGB is CMYK in a CMYK document: {to}"); + + let rect = settled(&mut app, &ctx, 3.0, i).unwrap(); + double_click(&mut app, &ctx, rect, 3.1, i); + let d = app.ui.dialog.as_mut().unwrap(); + d.fields.insert("color".into(), json!({"l": 55.0, "a": 20.0, "b": -30.0})); + crate::dialogs::confirm(&mut app).unwrap(); + let to = super::rows(app.ui.dialog.as_ref().unwrap())[i]["to"].clone(); + assert_eq!(to, "lab 55 20 -30", "a Lab color picked in the picker is kept as Lab: {to}"); + } + + #[test] + fn row_context_menu_pick_from_swatches_and_limit_to_library() { + let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default()); + app.run("file.new", json!({"width": 100, "height": 100})).unwrap(); + let id = app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 20, "height": 20})).unwrap()["id"].as_u64().unwrap(); + app.run("paint.setFill", json!({"ids": [id], "color": "#ff0000"})).unwrap(); + app.run("select.all", json!({})).unwrap(); + app.run("ui.recolorDialog", json!({})).unwrap(); + let ctx = egui::Context::default(); + crate::theme::install_fonts(&ctx); + frame(&mut app, &ctx, 0.0, vec![], 0); + + // Verify over_recolor with swatches=true sets swatches flag in Color Picker + let picker = super::super::color_picker::over_recolor(app.ui.dialog.as_ref().unwrap(), Color::rgb8(255, 0, 0), 0, true); + assert_eq!(picker.kind, "colorPicker"); + assert!(picker.bool("swatches"), "swatches view requested"); + + // Verify limitTo snaps the rows and syncs + app.ui.dialog.as_mut().unwrap().fields.insert("limitTo".into(), json!("document")); + frame(&mut app, &ctx, 0.1, vec![], 0); + let d = app.ui.dialog.as_ref().unwrap(); + assert_eq!(d.str("limitTo"), "document"); + + // Verify a row with to: null also opens the picker using its from color + let null_row = json!({"from": ["rgb 255 0 0"], "to": null}); + let c = super::to_color(&null_row).or_else(|| super::from_colors(&null_row).first().copied()).unwrap_or_default(); + let picker_null = super::super::color_picker::over_recolor(d, c, 0, true); + assert_eq!(picker_null.kind, "colorPicker"); + assert!(picker_null.bool("swatches")); } /// A 15 pt square at (`x`, 10) filled with `fill`, without a stroke. diff --git a/docs/gaps.md b/docs/gaps.md index 1647b6331e..96c114ea59 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -34,6 +34,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-16 | minor | G1: Recolor Artwork - native Lab entry in Color Picker, swatch libraries access in Color Picker, and row right-click context menu ("Pick from Swatches", "Limit to Library") (#4028); scores and estimates unchanged. | | 2026-11-15 | minor | G4 type: modal Check Spelling dialog (Edit › Spelling › Check Spelling…, `ui.checkSpelling`, #4936) with Not in Dictionary sentence context, suggestions, Ignore, Ignore All, Change, Change All, Add to Dictionary, Done/Cancel, keyboard navigation, and one-step Undo/Redo; spell check complete; scores and estimates unchanged. | | 2026-11-15 | minor | G5: Neon & Glow joins Shadows and Glows, Outlines and Rules, Hand-Drawn, Textures, Painted and Sketched, Gradient Finishes, Shape Effects, Blends and Transparency, Game HUD and Status Effects as an eleventh built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor; original procedural styles generated in code); estimate unchanged (3–13 h). | | 2026-11-14 | minor | G12: Symbols panel context menu: right-click on a symbol in thumbnail or list view displays a context menu (Place Symbol Instance, Edit Symbol, Duplicate Symbol, Delete Symbol, Break Link to Symbol, Select All Instances), selecting the symbol first if unselected; scores and estimates unchanged. | @@ -122,7 +123,7 @@ macOS cursor delivery (#2292) is narrowed to a native host adapter using the exi - **Done:** Distance Guides ([public page](https://helpx.adobe.com/illustrator/desktop/measure-and-align/grids-and-guides/use-distance-guides-for-accurate-placement.html)): with Smart Guides on and something selected, the Selection tool with Alt/Option held over another object shows the horizontal and vertical distances between them, and over an empty part of an artboard the selection's distances from its four edges, labelled in the General unit; Preferences › Smart Guides › Invoke Distance Guides turns them off. Hover only, as documented: not while moving or nudging. No entry closed; estimates unchanged. -- **Done (part of #4028):** Recolor Artwork › Assign: double-clicking a row's new color opens the Color Picker, as the [public page](https://helpx.adobe.com/illustrator/desktop/manage-colors/modify-colors/assign-new-colors-to-selected-artwork.html) describes. OK sets the row's new color in the model it was picked in, so a CMYK mix is no longer a hex value converted back; Cancel leaves the row. A Lab new color is kept, but can't be typed yet: the picker's Lab fields work in RGB, as for fill and stroke. **Missing:** Lab entry in the picker, swatch libraries in the picker and the row's right-click menu (Pick from Swatches, Limit to Library). +- **Done (#4028):** Recolor Artwork › Assign: double-clicking a row's new color opens the Color Picker, as the [public page](https://helpx.adobe.com/illustrator/desktop/manage-colors/modify-colors/assign-new-colors-to-selected-artwork.html) describes. OK sets the row's new color in the model it was picked in, so a CMYK mix is no longer a hex value converted back; Cancel leaves the row. Lab color values can be typed directly in the Color Picker's Lab fields without converting to RGB. Swatch libraries are accessible in the picker via a library dropdown. Rows in the Recolor Artwork Assign tab feature a right-click context menu with "Pick from Swatches" (opening Color Picker in swatches view) and "Limit to Library" (with library submenu). - **Done (#3416):** Recolor Artwork Edit chips scroll to the last color while the heading, color wheel and actions stay visible. Screen resize and UI scaling, Preview, Confirm, Cancel, Undo and #1733 wheel drags are covered in `tests/recolor.rs`. No gap entry closed; estimates unchanged. diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 65cbf9e216..d42f5102ef 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -61,6 +61,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-16 | minor | Recolor Artwork › Assign: native Lab entry in the Color Picker, swatch libraries access in the picker, and row context menu options (Pick from Swatches, Limit to Library) (#4028); scores and estimates unchanged. | | 2026-11-15 | minor | PDF import: stroked type (text rendering modes 1, 2, 5 and 6, and glyphs under `ActualText`) keeps the line cap, line join and miter limit of the graphics state it is stroked with, as paths do, instead of butt caps, miter joins and a miter limit of 10; a glyph filled and then stroked otherwise than the run its fill joined comes in as a run of its own, so the glyphs before it keep their stroke (#7741; `imported_stroked_type_keeps_the_files_cap_join_and_miter_limit` in `crates/pdf/src/tests/textstroke.rs`). Scores and estimates unchanged. | | 2026-11-15 | minor | G5: Neon & Glow joins Shadows and Glows, Outlines and Rules, Hand-Drawn, Textures, Painted and Sketched, Gradient Finishes, Shape Effects, Blends and Transparency, Game HUD and Status Effects as an eleventh built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor; original procedural styles generated in code); area score and estimate unchanged. | | 2026-11-14 | minor | G5: Weather Icons joins Basic Shapes, UI Frames, Map Markers, Inventory Icons and Skill Icons as a sixth built-in symbol library (Sun, Moon, Cloud, Rain, Thunder, Snow; original procedural vector symbols generated in code, no default 9-slice); area score and estimate unchanged. | diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 071c8d4719..363e1c28ae 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -498,7 +498,7 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po - [x] Home screen (part of #4684, shared UI with PhotoCraft): the welcome, New / Open buttons and Community block are centred, and the large Discord button takes the theme's accent instead of Discord's colour; the layout and wording of the preset cards and Recent Files are unchanged. Still open from #4684: shortcut hints on the buttons, PhotoCraft's PRO and STUDIO themes, the Preferences layout (search box, theme swatches, Apply) and the title bar. -- [x] Recolor Artwork › Assign: double-click a row's new color to pick it in the Color Picker, in the model it was picked in (part of #4028); a Lab new color is kept but can't be typed yet (the picker's Lab fields work in RGB); Lab entry, swatch libraries and the row menu remain. +- [x] Recolor Artwork › Assign: double-click a row's new color to pick it in the Color Picker, in the model it was picked in, with native Lab entry, swatch libraries access in the picker, and row context menu options (Pick from Swatches, Limit to Library) (#4028). - [x] Recolor Artwork › Color Theme Picker: with the button beside the tabs on, a click on the canvas takes the color palette of an object or image, a drag takes the palette of the art inside its marquee, and Shift adds more picks; the rows that aren't excluded take the palette as their new colors and the art previews them ([Recolor artwork](https://helpx.adobe.com/illustrator/desktop/manage-colors/modify-colors/recolor-artwork.html)). The number and order of the picked colors are VectorCraft's own rule (`recolor.pickTheme`). Tests: `theme_picks_give_the_rows_the_palette_of_the_art_picked` and `the_theme_picker_takes_clicks_and_shift_drags_on_the_canvas` in `crates/ui-egui/src/dialogs/recolor.rs`, `theme_picker_*` in `crates/engine/src/tests/recolor.rs`. @@ -547,6 +547,7 @@ before release (#6373). [Paint faces and edges](https://helpx.adobe.com/illustra | Date | Change | Summary | |---|---|---| +| 2026-11-16 | minor | Recolor Artwork › Assign: native Lab entry in the Color Picker, swatch libraries access in the picker, and row context menu options (Pick from Swatches, Limit to Library) (#4028). Scores and estimates unchanged. | | 2026-11-14 | minor | Tech Circuit adds three original procedural brushes (Circuit Trace, Bus Lines, Terminal Nodes); ten built-in brush libraries. G5 remaining estimate 3–13 h (estimated); parity scores and headline totals unchanged. | | 2026-11-12 | minor | Numeric fields: a focus click released more than 1 pt from its press keeps the caret; a tap within 1 pt still selects the whole value (#6659, follow-up to #1326). Scores and estimates unchanged. | | 2026-11-12 | minor | Remove Background for a selected image in the Contextual Task Bar, Properties › Quick Actions and the Control bar, which runs at once with its defaults. Scores and estimates unchanged. | From 713252db570e3bcc994f9351faf21511f6f2119b Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Mon, 16 Nov 2026 16:34:36 +0530 Subject: [PATCH 4/5] #4943: avoid duplicate Swedish language labels --- crates/ui-egui/src/i18n/sv.tsv | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 3693ac379b..62ac5b67a8 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -7542,9 +7542,7 @@ breakText Glyphs Glyfer Malayalam Malayalam Odia Oriya Urdu Urdu - Sanskrit Sanskrit Nepali Nepalesiska - Assamese Assamesiska Konkani Konkani Sindhi Sindhi VectorCraft {release} and later (version {n}) VectorCraft {release} och senare (version {n}) From d7a1877e98d53f266f5d4b835051b804f60950ad Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Mon, 16 Nov 2026 17:41:20 +0530 Subject: [PATCH 5/5] #8053: keep French tangent punctuation nonbreaking --- crates/ui-egui/src/i18n/fr.tsv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index f5d45759f9..75f4f14c6f 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -7464,9 +7464,9 @@ breakText Glyphs Glyphes @msg a selected path has no area un tracé sélectionné n’a pas de surface @msg a selected path has more than 10000 segments un tracé sélectionné a plus de 10000 segments @msg the two paths have the same outline les deux tracés ont le même contour -@msg One path lies inside the other, so they have no common tangents Un tracé se trouve à l’intérieur de l’autre : ils n’ont donc aucune tangente commune -@msg The paths overlap, so they have no internal tangents Les tracés se chevauchent : ils n’ont donc aucune tangente interne -@msg One path lies inside the other, so they have no internal tangents Un tracé se trouve à l’intérieur de l’autre : ils n’ont donc aucune tangente interne +@msg One path lies inside the other, so they have no common tangents Un tracé se trouve à l’intérieur de l’autre : ils n’ont donc aucune tangente commune +@msg The paths overlap, so they have no internal tangents Les tracés se chevauchent : ils n’ont donc aucune tangente interne +@msg One path lies inside the other, so they have no internal tangents Un tracé se trouve à l’intérieur de l’autre : ils n’ont donc aucune tangente interne # Path Precision Tools add-on: Expand Dashes into Paths. Expand Dashes into Paths Décomposer les tirets en tracés @msg select paths with dashed strokes to expand sélectionnez des tracés à contour pointillé à décomposer