mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 09:26:43 +00:00
test(io): align hostile TySh import expectations with geometry rejection
This commit is contained in:
1 parent
a957a52e1e
commit
aad90a0fc5
1 file changed
+7
-1
@@ -367,7 +367,13 @@ fn hostile_type_sizes_without_pixels_import_without_a_huge_render() {
|
||||
{
|
||||
let runs = vec![Run { len: 1, size, leading: None }];
|
||||
let data = tysh("M", &runs, None, transform, [10.0, 10.0, 20.0, 20.0]);
|
||||
let mut t = photocraft_text::psd::text_layer_from_tysh(&data, 72.0).unwrap();
|
||||
// Extremely large TySh transforms are now rejected before any layout or rendering.
|
||||
// Keep testing the import-time render cap for matrices within the safety gate.
|
||||
if !photocraft_text::psd::usable_tysh_transform(&transform.m) {
|
||||
assert!(photocraft_text::psd::text_layer_from_tysh(&data, 72.0).is_none(), "unsafe transform must be rejected before layout");
|
||||
continue;
|
||||
}
|
||||
let mut t = photocraft_text::psd::text_layer_from_tysh(&data, 72.0).expect("valid TySh transform");
|
||||
if big {
|
||||
// Precondition: the renderer's own guard (256 Mpx) would have drawn this one.
|
||||
let mut engine = photocraft_text::TextEngine::new();
|
||||
|
||||
Reference in new issue
Block a user