diff --git a/crates/text/src/fontdb/stylistic_sets.rs b/crates/text/src/fontdb/stylistic_sets.rs index 3bded3d03..8d6578227 100644 --- a/crates/text/src/fontdb/stylistic_sets.rs +++ b/crates/text/src/fontdb/stylistic_sets.rs @@ -8,11 +8,11 @@ use super::FontFace; use super::names::name; /// One `ss01`–`ss20` feature in a face. `number` is the tag's number; `name` is the font's UI -/// label when it supplies one, otherwise `Set 1` through `Set 20`. +/// label when it supplies one, and `None` otherwise. #[derive(Clone, Debug, PartialEq, Eq)] pub struct StylisticSet { pub number: u8, - pub name: String, + pub name: Option, } /// The `ssNN` number in a feature tag, if it is one of the twenty registered sets. @@ -25,8 +25,9 @@ fn number(tag: [u8; 4]) -> Option { } /// Collect registered set records from either layout table. Fonts may carry a set in GSUB, GPOS, -/// or both. A readable custom name takes precedence over the numbered fallback. -fn collect(font: &skrifa::FontRef<'_>, features: FeatureList<'_>, labels: &mut [Option; 20]) { +/// or both. `labels[n - 1]` is `Some` once set `n` is found, holding its readable custom name if +/// any record supplies one. +fn collect(font: &skrifa::FontRef<'_>, features: FeatureList<'_>, labels: &mut [Option>; 20]) { for record in features.feature_records().iter().take(4096) { let Some(n) = number(record.feature_tag().to_be_bytes()) else { continue }; let Ok(feature) = record.feature(features.offset_data()) else { continue }; @@ -38,10 +39,10 @@ fn collect(font: &skrifa::FontRef<'_>, features: FeatureList<'_>, labels: &mut [ _ => None, }); let slot = &mut labels[n - 1]; - if let Some(custom) = custom { + if custom.is_some() { *slot = Some(custom); } else if slot.is_none() { - *slot = Some(format!("Set {n}")); + *slot = Some(None); } } } @@ -51,7 +52,7 @@ impl FontFace { /// skipped, and no more than 4096 feature records from either table are read. pub fn stylistic_sets(&self) -> Vec { let Some(font) = self.skrifa() else { return Vec::new() }; - let mut labels: [Option; 20] = std::array::from_fn(|_| None); + let mut labels: [Option>; 20] = std::array::from_fn(|_| None); if let Ok(gsub) = font.gsub() && let Ok(features) = gsub.feature_list() { @@ -120,9 +121,6 @@ mod tests { let db = super::super::FontDb::with_font_dirs(vec![]); assert_eq!(db.add_font(builder.build()), 1); let face = db.face("Stylistic Test Sans", "Regular").unwrap(); - assert_eq!( - face.stylistic_sets(), - [StylisticSet { number: 1, name: "Curved Capitals".into() }, StylisticSet { number: 3, name: "Set 3".into() }] - ); + assert_eq!(face.stylistic_sets(), [StylisticSet { number: 1, name: Some("Curved Capitals".into()) }, StylisticSet { number: 3, name: None }]); } } diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index b37a00f29..a69bd4f0d 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -3238,6 +3238,7 @@ digits Malayalam Малаялам Swap start and end arrowheads Размяна на началната и крайната стрелка Swap the selected object for the file, keeping its place and transform Замяна на избрания обект с файла, като се запазват мястото и трансформациите му Stylistic Alternates Стилистични алтернативи + Set {n} Набор {n} Swash Декоративен елемент Swatch Conflict Конфликт на образци Swatch Conflicts Конфликти на образци diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 80241a31a..212e28f2b 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -1816,6 +1816,7 @@ digits Malayalam Malajalam Select text to set its OpenType features. Odaberite tekst da postavite njegove OpenType mogućnosti. Standard Ligatures Standardne ligature Stylistic Alternates Stilske alternative + Set {n} Skup {n} Swash Ukrasni potez Tabular Lining Tabelarne brojke Tabular Oldstyle Tabelarne stare brojke diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 95e790242..552b0b8ac 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -6021,6 +6021,7 @@ anchor Points: Punts: Character Color Color del caràcter OpenType Features Funcions OpenType Stylistic Sets Jocs estilístics + Set {n} Joc {n} @msg features lists at most {max} tags features admet com a màxim {max} etiquetes @msg unknown OpenType feature `{t}` funció OpenType desconeguda `{t}` @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} diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 358d56060..d96985198 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -6037,6 +6037,7 @@ anchor Points: Body: Character Color Barva znaků OpenType Features Funkce OpenType Stylistic Sets Stylistické sady + Set {n} Sada {n} @msg features lists at most {max} tags features obsahuje nejvýše {max} značek @msg unknown OpenType feature `{t}` neznámá funkce OpenType `{t}` @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} diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 8c8b83023..b050dbb63 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -1656,6 +1656,7 @@ digits Malayalam Malayalam Select text to set its OpenType features. Markér tekst for at angive dens OpenType-funktioner. Standard Ligatures Standardligaturer Stylistic Alternates Stilistiske alternativer + Set {n} Sæt {n} Swash Sving Tabular Lining Tabulære versalcifre Tabular Oldstyle Tabulære mediævalcifre diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index ffdcec8b7..a26cc0c1a 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -5622,6 +5622,7 @@ anchor Points: Punkte: Character Color Zeichenfarbe OpenType Features OpenType-Funktionen Stylistic Sets Stilsätze + Set {n} Satz {n} @msg features lists at most {max} tags features enthält höchstens {max} Tags @msg unknown OpenType feature `{t}` unbekannte OpenType-Funktion `{t}` @msg {label} must be a number above 0 and at most {max} {label} muss eine Zahl über 0 und höchstens {max} sein diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 8fc68ba0f..78bc64257 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -5988,6 +5988,7 @@ anchor Points: Σημεία: Character Color Χρώμα χαρακτήρων OpenType Features Χαρακτηριστικά OpenType Stylistic Sets Στιλιστικά σύνολα + Set {n} Σύνολο {n} @msg features lists at most {max} tags Το features περιέχει έως {max} ετικέτες @msg unknown OpenType feature `{t}` άγνωστο χαρακτηριστικό OpenType `{t}` @msg {label} must be a number above 0 and at most {max} Το {label} πρέπει να είναι αριθμός μεγαλύτερος από 0 και έως {max} diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index ff63ecb21..4c49048ae 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -5979,6 +5979,7 @@ anchor Points: Puntos: Character Color Color de los caracteres OpenType Features Funciones OpenType Stylistic Sets Conjuntos estilísticos + Set {n} Conjunto {n} @msg features lists at most {max} tags features admite como máximo {max} etiquetas @msg unknown OpenType feature `{t}` función OpenType desconocida `{t}` @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} diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 76aa0990b..363c388db 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -6067,6 +6067,7 @@ anchor Points: Pisteet: Character Color Merkin väri OpenType Features OpenType-ominaisuudet Stylistic Sets Tyylisarjat + Set {n} Sarja {n} @msg features lists at most {max} tags features sisältää enintään {max} tunnistetta @msg unknown OpenType feature `{t}` tuntematon OpenType-ominaisuus `{t}` @msg {label} must be a number above 0 and at most {max} {label} on oltava luku, joka on yli 0 ja enintään {max} diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 22365ad64..2fc442dab 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -6032,6 +6032,7 @@ anchor Points: Points : Character Color Couleur des caractères OpenType Features Fonctions OpenType Stylistic Sets Jeux stylistiques + Set {n} Jeu {n} @msg features lists at most {max} tags features contient au plus {max} balises @msg unknown OpenType feature `{t}` fonction OpenType inconnue `{t}` @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} diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 9523bca33..f5be6e413 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -6021,6 +6021,7 @@ anchor Points: Pontok: Character Color Karakterszín OpenType Features OpenType-funkciók Stylistic Sets Stíluskészletek + Set {n} {n}. készlet @msg features lists at most {max} tags a features legfeljebb {max} címkét tartalmazhat @msg unknown OpenType feature `{t}` ismeretlen OpenType-funkció: `{t}` @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 diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 15969f1da..0c4be65a6 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -1656,6 +1656,7 @@ digits Malayalam Malayalam Select text to set its OpenType features. Pilih teks untuk mengatur fitur OpenType-nya. Standard Ligatures Ligatur standar Stylistic Alternates Alternatif gaya + Set {n} Set {n} Swash Swash Tabular Lining Lining tabular Tabular Oldstyle Oldstyle tabular diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 93ac2c95d..12da08947 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -5656,6 +5656,7 @@ anchor Points: Punti: Character Color Colore carattere OpenType Features Funzioni OpenType Stylistic Sets Set stilistici + Set {n} Set {n} @msg features lists at most {max} tags features contiene al massimo {max} tag @msg unknown OpenType feature `{t}` funzione OpenType sconosciuta `{t}` @msg {label} must be a number above 0 and at most {max} {label} deve essere un numero maggiore di 0 e al massimo {max} diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 4fa88c824..f68f17fc5 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -5721,6 +5721,7 @@ anchor Points: ポイント: Character Color 文字カラー OpenType Features OpenType 機能 Stylistic Sets スタイルセット + Set {n} セット {n} @msg features lists at most {max} tags features に指定できるタグは {max} 個までです @msg unknown OpenType feature `{t}` 不明な OpenType 機能 `{t}` @msg {label} must be a number above 0 and at most {max} {label} には 0 より大きく {max} 以下の数値を指定してください diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index d3556f443..f329a90f8 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -6033,6 +6033,7 @@ anchor Points: წერტილები: Character Color სიმბოლოს ფერი OpenType Features OpenType შესაძლებლობები Stylistic Sets სტილისტური ნაკრებები + Set {n} ნაკრები {n} @msg features lists at most {max} tags features შეიძლება შეიცავდეს არაუმეტეს {max} ტეგს @msg unknown OpenType feature `{t}` უცნობი OpenType შესაძლებლობა `{t}` @msg {label} must be a number above 0 and at most {max} {label} უნდა იყოს 0-ზე მეტი და არაუმეტეს {max}-ისა რიცხვი diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index b6e935e2e..abdcb7cf6 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -5617,6 +5617,7 @@ anchor Points: 포인트: Character Color 문자 색상 OpenType Features OpenType 기능 Stylistic Sets 스타일 세트 + Set {n} 세트 {n} @msg features lists at most {max} tags features에는 태그를 최대 {max}개까지 지정할 수 있습니다 @msg unknown OpenType feature `{t}` 알 수 없는 OpenType 기능 `{t}` @msg {label} must be a number above 0 and at most {max} {label}은(는) 0 초과 {max} 이하의 숫자여야 합니다 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 2d2dcccf1..fb2ebeb99 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -1670,6 +1670,7 @@ digits Malayalam Malayalam Select text to set its OpenType features. Selecteer tekst om de OpenType-functies in te stellen. Standard Ligatures Standaardligaturen Stylistic Alternates Stilistische alternatieven + Set {n} Set {n} Swash Swash Tabular Lining Tabulaire lining Tabular Oldstyle Tabulaire oldstyle diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index d30c71807..f329a539a 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -5891,6 +5891,7 @@ anchor Points: Punkty: Character Color Kolor znaków OpenType Features Funkcje OpenType Stylistic Sets Zestawy stylistyczne + Set {n} Zestaw {n} @msg features lists at most {max} tags features może zawierać najwyżej {max} znaczników @msg unknown OpenType feature `{t}` nieznana funkcja OpenType `{t}` @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} diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 9bde60f44..726c16d44 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -5953,6 +5953,7 @@ anchor Points: Pontos: Character Color Cor do Caractere OpenType Features Recursos OpenType Stylistic Sets Conjuntos Estilísticos + Set {n} Conjunto {n} @msg features lists at most {max} tags features aceita no máximo {max} marcas @msg unknown OpenType feature `{t}` recurso OpenType desconhecido `{t}` @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} diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 0e55857a6..ba7a94689 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -6014,6 +6014,7 @@ anchor Points: Точки: Character Color Цвет символов OpenType Features Функции OpenType Stylistic Sets Стилистические наборы + Set {n} Набор {n} @msg features lists at most {max} tags features содержит не более {max} тегов @msg unknown OpenType feature `{t}` неизвестная функция OpenType `{t}` @msg {label} must be a number above 0 and at most {max} {label} должно быть числом больше 0 и не более {max} diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 49c81d06b..81942ced5 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -6089,6 +6089,7 @@ shape Open Öppen Character Color Teckenfärg OpenType Features OpenType-funktioner Stylistic Sets Stilistiska uppsättningar + Set {n} Uppsättning {n} @msg features lists at most {max} tags features får innehålla högst {max} taggar @msg unknown OpenType feature `{t}` okänd OpenType-funktion `{t}` @msg {label} must be a number above 0 and at most {max} {label} måste vara ett tal över 0 och högst {max} diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 3dfae8af3..af1a87f89 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -5994,6 +5994,7 @@ anchor Points: Noktalar: Character Color Karakter Rengi OpenType Features OpenType Özellikleri Stylistic Sets Stilistik Setler + Set {n} Set {n} @msg features lists at most {max} tags features en fazla {max} etiket içerebilir @msg unknown OpenType feature `{t}` bilinmeyen OpenType özelliği `{t}` @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 diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 5d37cd09c..07e5d8db9 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -5636,6 +5636,7 @@ anchor Points: Точки: Character Color Колір символів OpenType Features Функції OpenType Stylistic Sets Стилістичні набори + Set {n} Набір {n} @msg features lists at most {max} tags features містить не більше {max} тегів @msg unknown OpenType feature `{t}` невідома функція OpenType `{t}` @msg {label} must be a number above 0 and at most {max} {label} має бути числом більше 0 і не більше {max} diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 12fe93592..e0844fb25 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -5637,6 +5637,7 @@ anchor Points: Điểm: Character Color Màu ký tự OpenType Features Tính năng OpenType Stylistic Sets Bộ phong cách + Set {n} Bộ {n} @msg features lists at most {max} tags features chứa tối đa {max} thẻ @msg unknown OpenType feature `{t}` tính năng OpenType không xác định `{t}` @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} diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index d9e5f84b4..1ea470392 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -5878,6 +5878,7 @@ anchor Points: 点: Character Color 字符颜色 OpenType Features OpenType 特性 Stylistic Sets 风格集 + Set {n} 风格集 {n} @msg features lists at most {max} tags features 最多包含 {max} 个标签 @msg unknown OpenType feature `{t}` 未知的 OpenType 特性 `{t}` @msg {label} must be a number above 0 and at most {max} {label} 必须是大于 0 且不超过 {max} 的数字 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index b387b0a81..8d7d0ff58 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -5674,6 +5674,7 @@ anchor Points: 點: Character Color 字元顏色 OpenType Features OpenType 功能 Stylistic Sets 風格集 + Set {n} 風格集 {n} @msg features lists at most {max} tags features 最多包含 {max} 個標籤 @msg unknown OpenType feature `{t}` 未知的 OpenType 功能 `{t}` @msg {label} must be a number above 0 and at most {max} {label} 必須是大於 0 且不超過 {max} 的數字 diff --git a/crates/ui-egui/src/panels/opentype.rs b/crates/ui-egui/src/panels/opentype.rs index cdff2df1c..ca5a7dfb0 100644 --- a/crates/ui-egui/src/panels/opentype.rs +++ b/crates/ui-egui/src/panels/opentype.rs @@ -4,7 +4,7 @@ use egui::Ui; use serde_json::json; -use vectorcraft_text::{EXTRA_FEATURES, FontDb, OtFeatures}; +use vectorcraft_text::{EXTRA_FEATURES, FontDb, OtFeatures, StylisticSet}; use super::character::{shared, text_editing, text_style}; use crate::VectorcraftApp; @@ -208,7 +208,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { for set in &sets { let flag = Flag::Extra(EXTRA_FEATURES[usize::from(set.number - 1)]); let on = flag.get(&next); - if widgets::check(ui, &set.name, on, true) { + if widgets::check(ui, &set_label(set), on, true) { change = Some(Change::Toggle(flag, !on)); } } @@ -222,6 +222,15 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { } } +/// A Stylistic Sets menu entry: the font's own name for the set, or `Set 1` through `Set 20` in +/// the UI language. +fn set_label(set: &StylisticSet) -> String { + match &set.name { + Some(name) => name.clone(), + None => crate::i18n::fmt(tl!("Set {n}"), &[("n", &set.number.to_string())]), + } +} + /// The panel's checkbox rows, in the order they are drawn. fn rows() -> [Toggle; 9] { [ @@ -311,6 +320,21 @@ mod tests { assert_eq!(text_style(&app).unwrap().0.features, ["ss03"]); } + /// A set the font names keeps the font's name; a set without one gets the numbered label in + /// the UI language. + #[test] + fn stylistic_set_labels_follow_the_ui_language() { + let named = StylisticSet { number: 1, name: Some("Curved Capitals".into()) }; + let numbered = StylisticSet { number: 3, name: None }; + assert_eq!(set_label(&numbered), "Set 3"); + let Some(de) = crate::i18n::Lang::from_code("de") else { panic!("no German catalog") }; + crate::i18n::set_current(de); + let (named_de, numbered_de) = (set_label(&named), set_label(&numbered)); + crate::i18n::set_current(crate::i18n::Lang::EN); + assert_eq!(named_de, "Curved Capitals"); + assert_eq!(numbered_de, "Satz 3"); + } + /// The Figure menu lists its five entries in order; Proportional Lining sets `pnum` and /// `lnum` and clears `tnum` and `onum`, Tabular Lining clears `pnum`, Proportional Oldstyle /// clears `lnum`, and Default Figure and Tabular Oldstyle clear `pnum` and `lnum`.