Compare commits
3 Commits
main
...
i18n-catch
| Author | SHA1 | Date |
|---|---|---|
|
|
716ab9477b | |
|
|
1d991513e2 | |
|
|
7f046d96e5 |
|
|
@ -222,3 +222,25 @@ fn the_scan_lists_a_variable_fonts_named_instances_as_loading_it_does() {
|
|||
assert!(loaded.iter().any(|(family, _, legacy)| family != legacy), "{loaded:?}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fallback_cache_is_dropped_when_a_face_loads_by_its_legacy_family_name() {
|
||||
// #121 with #219: a lookup by a legacy family name ("Sysfont Sans3 Semibold") loads faces,
|
||||
// so fallbacks remembered before it are searched again.
|
||||
let dir = font_dir("fallback-legacy");
|
||||
std::fs::write(dir.join("Sysfont-Semibold.ttf"), renamed("SourceSans3-Semibold.ttf")).unwrap();
|
||||
let db = FontDb::with_font_dirs(vec![dir]);
|
||||
db.set_system_fallback(false);
|
||||
let latin = db.face(FALLBACK_FAMILY, "Regular");
|
||||
let thai = 'ก';
|
||||
assert!(db.fallback_for(thai, latin.id()).is_none());
|
||||
let before = db.read_faces().len();
|
||||
let semibold = format!("{FAMILY} Semibold");
|
||||
let f = db.face(&semibold, "Regular");
|
||||
assert_eq!((f.style.as_str(), f.legacy_family.as_str()), ("Semibold", semibold.as_str()));
|
||||
assert!(db.read_faces().len() > before, "the installed family loaded");
|
||||
assert!(db.fallback_for('A', f.id()).is_some_and(|g| g.id() != f.id()));
|
||||
let cache = db.fallbacks.read().unwrap();
|
||||
assert_eq!(cache.faces, db.read_faces().len());
|
||||
assert!(!cache.map.contains_key(&(thai, latin.id())), "answers from before the load are dropped");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1011,3 +1011,13 @@
|
|||
Dark Oscuro
|
||||
Use system setting Usar la configuración del sistema
|
||||
A file dialog is already open. Ya hay un cuadro de diálogo de archivo abierto.
|
||||
Alt text Texto alternativo
|
||||
Alt: Alt.:
|
||||
W: An.:
|
||||
H: Al.:
|
||||
Reset Restablecer
|
||||
Reset Crop Restablecer recorte
|
||||
Insert a new equation (Alt+=) Insertar una ecuación nueva (Alt+=)
|
||||
Leave the equation (Esc) Salir de la ecuación (Esc)
|
||||
Preview Vista previa
|
||||
getartcraft.com/apps/wordcraft getartcraft.com/apps/wordcraft
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 25.
|
|
|
@ -994,3 +994,13 @@
|
|||
Dark ダーク
|
||||
Use system setting システム設定を使用
|
||||
A file dialog is already open. ファイル ダイアログが既に開いています。
|
||||
Alt text 代替テキスト
|
||||
Alt: 代替テキスト:
|
||||
W: 幅:
|
||||
H: 高さ:
|
||||
Reset リセット
|
||||
Reset Crop トリミングのリセット
|
||||
Insert a new equation (Alt+=) 新しい数式を挿入 (Alt+=)
|
||||
Leave the equation (Esc) 数式を終了 (Esc)
|
||||
Preview プレビュー
|
||||
getartcraft.com/apps/wordcraft getartcraft.com/apps/wordcraft
|
||||
|
|
|
|||
|
Can't render this file because it has a wrong number of fields in line 3.
|
|
|
@ -1006,3 +1006,13 @@
|
|||
Dark Escuro
|
||||
Use system setting Usar a configuração do sistema
|
||||
A file dialog is already open. Já há uma caixa de diálogo de arquivo aberta.
|
||||
Alt text Texto alternativo
|
||||
Alt: Alt.:
|
||||
W: L:
|
||||
H: A:
|
||||
Reset Redefinir
|
||||
Reset Crop Redefinir corte
|
||||
Insert a new equation (Alt+=) Inserir uma nova equação (Alt+=)
|
||||
Leave the equation (Esc) Sair da equação (Esc)
|
||||
Preview Visualizar
|
||||
getartcraft.com/apps/wordcraft getartcraft.com/apps/wordcraft
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 25.
|
|
|
@ -1005,3 +1005,13 @@
|
|||
Type the recipients, or load them from a file. Unesite primaoce ili ih učitajte iz fajla.
|
||||
Use an Existing List… Koristi postojeću listu…
|
||||
A file dialog is already open. Dijalog za fajlove je već otvoren.
|
||||
Alt text Alternativni tekst
|
||||
Alt: Alt. tekst:
|
||||
W: Š:
|
||||
H: V:
|
||||
Reset Vrati
|
||||
Reset Crop Poništi isecanje
|
||||
Insert a new equation (Alt+=) Umetni novu jednačinu (Alt+=)
|
||||
Leave the equation (Esc) Napusti jednačinu (Esc)
|
||||
Preview Pregled
|
||||
getartcraft.com/apps/wordcraft getartcraft.com/apps/wordcraft
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 25.
|
|
|
@ -1010,3 +1010,13 @@
|
|||
Type the recipients, or load them from a file. Унесите примаоце или их учитајте из фајла.
|
||||
Use an Existing List… Користи постојећу листу…
|
||||
A file dialog is already open. Дијалог за фајлове је већ отворен.
|
||||
Alt text Алтернативни текст
|
||||
Alt: Алт. текст:
|
||||
W: Ш:
|
||||
H: В:
|
||||
Reset Врати
|
||||
Reset Crop Поништи исецање
|
||||
Insert a new equation (Alt+=) Уметни нову једначину (Alt+=)
|
||||
Leave the equation (Esc) Напусти једначину (Esc)
|
||||
Preview Преглед
|
||||
getartcraft.com/apps/wordcraft getartcraft.com/apps/wordcraft
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 11 and column 25.
|
|
|
@ -1006,3 +1006,13 @@
|
|||
Dark Темна
|
||||
Use system setting Як у системі
|
||||
A file dialog is already open. Діалогове вікно файлу вже відкрито.
|
||||
Alt text Альтернативний текст
|
||||
Alt: Альт.:
|
||||
W: Ш:
|
||||
H: В:
|
||||
Reset Скинути
|
||||
Reset Crop Скинути обітнення
|
||||
Insert a new equation (Alt+=) Вставити нове рівняння (Alt+=)
|
||||
Leave the equation (Esc) Вийти з рівняння (Esc)
|
||||
Preview Попередній перегляд
|
||||
getartcraft.com/apps/wordcraft getartcraft.com/apps/wordcraft
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 31.
|
|
|
@ -1005,3 +1005,13 @@
|
|||
Dark 深色
|
||||
Use system setting 使用系统设置
|
||||
A file dialog is already open. 已有一个文件对话框处于打开状态。
|
||||
Alt text 替代文字
|
||||
Alt: 替代文字:
|
||||
W: 宽:
|
||||
H: 高:
|
||||
Reset 重设
|
||||
Reset Crop 重设裁剪
|
||||
Insert a new equation (Alt+=) 插入新公式 (Alt+=)
|
||||
Leave the equation (Esc) 退出公式 (Esc)
|
||||
Preview 预览
|
||||
getartcraft.com/apps/wordcraft getartcraft.com/apps/wordcraft
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 25.
|
|
|
@ -995,3 +995,13 @@
|
|||
Dark 深色
|
||||
Use system setting 使用系統設定
|
||||
A file dialog is already open. 已有一個檔案對話方塊開啟中。
|
||||
Alt text 替代文字
|
||||
Alt: 替代文字:
|
||||
W: 寬:
|
||||
H: 高:
|
||||
Reset 重設
|
||||
Reset Crop 重設裁剪
|
||||
Insert a new equation (Alt+=) 插入新方程式 (Alt+=)
|
||||
Leave the equation (Esc) 離開方程式 (Esc)
|
||||
Preview 預覽
|
||||
getartcraft.com/apps/wordcraft getartcraft.com/apps/wordcraft
|
||||
|
|
|
|||
|
Can't render this file because it has a wrong number of fields in line 4.
|
Loading…
Reference in New Issue