Skip to content

Commit de5d112

Browse files
committed
Tests: Prune redundant renmatrix text cases and right-size the rest
The justify acceptance cases duplicate text-mechanics coverage that rendertext.ps.test exercises directly at the right layer; the error naming per text group remains covered by the retained error cases. The remaining text-painting cases rendered onto 1x1-module symbols, which the renderer normalises to a large per-module scale. Some interpreters rasterise glyphs at the resulting effective size, making each case needlessly expensive. A 10x10 grid keeps the option plumbing coverage (group collection, aliases) at negligible cost.
1 parent 1d92017 commit de5d112

1 file changed

Lines changed: 14 additions & 54 deletions

File tree

tests/ps_tests/renmatrix.ps.test

Lines changed: 14 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -403,17 +403,6 @@
403403
>> renmatrix
404404
} /bwipp.extratextBadyalign isError
405405

406-
{
407-
0 0 moveto
408-
<<
409-
/ren /renmatrix
410-
/pixs [1]
411-
/pixx 1
412-
/pixy 1
413-
/opt << /includetext true /alttext (TEST) /textxalign /justify /textdirection /forward >>
414-
>> renmatrix true
415-
} true isEqual
416-
417406
{
418407
0 0 moveto
419408
<<
@@ -425,17 +414,6 @@
425414
>> renmatrix
426415
} /bwipp.textxjustify isError
427416

428-
{
429-
0 0 moveto
430-
<<
431-
/ren /renmatrix
432-
/pixs [1]
433-
/pixx 1
434-
/pixy 1
435-
/opt << /includetext true /alttext (TEST) /textyalign /justify /textdirection /upward >>
436-
>> renmatrix true
437-
} true isEqual
438-
439417
{
440418
0 0 moveto
441419
<<
@@ -447,17 +425,6 @@
447425
>> renmatrix
448426
} /bwipp.textyjustify isError
449427

450-
{
451-
0 0 moveto
452-
<<
453-
/ren /renmatrix
454-
/pixs [1]
455-
/pixx 1
456-
/pixy 1
457-
/opt << /extratext (EXTRA) /extratextxalign /justify /extratextdirection /forward >>
458-
>> renmatrix true
459-
} true isEqual
460-
461428
{
462429
0 0 moveto
463430
<<
@@ -469,17 +436,6 @@
469436
>> renmatrix
470437
} /bwipp.extratextxjustify isError
471438

472-
{
473-
0 0 moveto
474-
<<
475-
/ren /renmatrix
476-
/pixs [1]
477-
/pixx 1
478-
/pixy 1
479-
/opt << /extratext (EXTRA) /extratextyalign /justify /extratextdirection /upward >>
480-
>> renmatrix true
481-
} true isEqual
482-
483439
{
484440
0 0 moveto
485441
<<
@@ -667,12 +623,16 @@
667623
%
668624
% text3-9 options and validation
669625
%
626+
% Cases that paint text use a 10x10 grid: a 1x1 symbol is normalised to a
627+
% large per-module scale, making glyph rasterisation needlessly expensive
628+
% on some interpreters. Text mechanics are covered by rendertext.ps.test.
629+
%
670630

671631
% text3 rendering
672-
{ 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /text3 (EXTRA) >> >> renmatrix true } true isEqual
632+
{ 0 0 moveto << /ren /renmatrix /pixs [ 100 { 1 } repeat ] /pixx 10 /pixy 10 /opt << /text3 (EXTRA) >> >> renmatrix true } true isEqual
673633

674634
% text3 with font/alignment options
675-
{ 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /text3 (HELLO) /text3font (Helvetica) /text3xalign /center /text3yalign /below >> >> renmatrix true } true isEqual
635+
{ 0 0 moveto << /ren /renmatrix /pixs [ 100 { 1 } repeat ] /pixx 10 /pixy 10 /opt << /text3 (HELLO) /text3font (Helvetica) /text3xalign /center /text3yalign /below >> >> renmatrix true } true isEqual
676636

677637
% text3 validation errors
678638
{ 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /text3xalign /invalid >> >> renmatrix } /bwipp.text3Badxalign isError
@@ -692,28 +652,28 @@
692652
{ 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /text3 (TEST) /text3yalign /justify /text3direction /forward >> >> renmatrix } /bwipp.text3yjustify isError
693653

694654
% Alias backward compatibility: alttext => text1
695-
{ 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /includetext true /alttext (TEST) /textxalign /center >> >> renmatrix true } true isEqual
655+
{ 0 0 moveto << /ren /renmatrix /pixs [ 100 { 1 } repeat ] /pixx 10 /pixy 10 /opt << /includetext true /alttext (TEST) /textxalign /center >> >> renmatrix true } true isEqual
696656

697657
% Alias backward compatibility: extratext => text2
698-
{ 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /extratext (EXTRA) >> >> renmatrix true } true isEqual
658+
{ 0 0 moveto << /ren /renmatrix /pixs [ 100 { 1 } repeat ] /pixx 10 /pixy 10 /opt << /extratext (EXTRA) >> >> renmatrix true } true isEqual
699659

700660
% Alias: textsubspace => text1subspace
701-
{ 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /includetext true /alttext (A_B) /textsubspace (_) >> >> renmatrix true } true isEqual
661+
{ 0 0 moveto << /ren /renmatrix /pixs [ 100 { 1 } repeat ] /pixx 10 /pixy 10 /opt << /includetext true /alttext (A_B) /textsubspace (_) >> >> renmatrix true } true isEqual
702662

703663
% Alias: textsplit => text1split
704-
{ 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /includetext true /alttext (A|B) /textsplit (|) >> >> renmatrix true } true isEqual
664+
{ 0 0 moveto << /ren /renmatrix /pixs [ 100 { 1 } repeat ] /pixx 10 /pixy 10 /opt << /includetext true /alttext (A|B) /textsplit (|) >> >> renmatrix true } true isEqual
705665

706666
% Alias: alttextsubspace => text1subspace
707-
{ 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /includetext true /alttext (A_B) /alttextsubspace (_) >> >> renmatrix true } true isEqual
667+
{ 0 0 moveto << /ren /renmatrix /pixs [ 100 { 1 } repeat ] /pixx 10 /pixy 10 /opt << /includetext true /alttext (A_B) /alttextsubspace (_) >> >> renmatrix true } true isEqual
708668

709669
% Alias: alttextsplit => text1split
710-
{ 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /includetext true /alttext (A|B) /alttextsplit (|) >> >> renmatrix true } true isEqual
670+
{ 0 0 moveto << /ren /renmatrix /pixs [ 100 { 1 } repeat ] /pixx 10 /pixy 10 /opt << /includetext true /alttext (A|B) /alttextsplit (|) >> >> renmatrix true } true isEqual
711671

712672
% Primary name: text1subspace
713-
{ 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /includetext true /alttext (A_B) /text1subspace (_) >> >> renmatrix true } true isEqual
673+
{ 0 0 moveto << /ren /renmatrix /pixs [ 100 { 1 } repeat ] /pixx 10 /pixy 10 /opt << /includetext true /alttext (A_B) /text1subspace (_) >> >> renmatrix true } true isEqual
714674

715675
% Primary name: text1split
716-
{ 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /includetext true /alttext (A|B) /text1split (|) >> >> renmatrix true } true isEqual
676+
{ 0 0 moveto << /ren /renmatrix /pixs [ 100 { 1 } repeat ] /pixx 10 /pixy 10 /opt << /includetext true /alttext (A|B) /text1split (|) >> >> renmatrix true } true isEqual
717677

718678

719679
% gridfit renders without error

0 commit comments

Comments
 (0)