|
403 | 403 | >> renmatrix |
404 | 404 | } /bwipp.extratextBadyalign isError |
405 | 405 |
|
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 | | - |
417 | 406 | { |
418 | 407 | 0 0 moveto |
419 | 408 | << |
|
425 | 414 | >> renmatrix |
426 | 415 | } /bwipp.textxjustify isError |
427 | 416 |
|
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 | | - |
439 | 417 | { |
440 | 418 | 0 0 moveto |
441 | 419 | << |
|
447 | 425 | >> renmatrix |
448 | 426 | } /bwipp.textyjustify isError |
449 | 427 |
|
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 | | - |
461 | 428 | { |
462 | 429 | 0 0 moveto |
463 | 430 | << |
|
469 | 436 | >> renmatrix |
470 | 437 | } /bwipp.extratextxjustify isError |
471 | 438 |
|
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 | | - |
483 | 439 | { |
484 | 440 | 0 0 moveto |
485 | 441 | << |
|
667 | 623 | % |
668 | 624 | % text3-9 options and validation |
669 | 625 | % |
| 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 | +% |
670 | 630 |
|
671 | 631 | % 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 |
673 | 633 |
|
674 | 634 | % 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 |
676 | 636 |
|
677 | 637 | % text3 validation errors |
678 | 638 | { 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /text3xalign /invalid >> >> renmatrix } /bwipp.text3Badxalign isError |
|
692 | 652 | { 0 0 moveto << /ren /renmatrix /pixs [1] /pixx 1 /pixy 1 /opt << /text3 (TEST) /text3yalign /justify /text3direction /forward >> >> renmatrix } /bwipp.text3yjustify isError |
693 | 653 |
|
694 | 654 | % 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 |
696 | 656 |
|
697 | 657 | % 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 |
699 | 659 |
|
700 | 660 | % 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 |
702 | 662 |
|
703 | 663 | % 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 |
705 | 665 |
|
706 | 666 | % 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 |
708 | 668 |
|
709 | 669 | % 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 |
711 | 671 |
|
712 | 672 | % 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 |
714 | 674 |
|
715 | 675 | % 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 |
717 | 677 |
|
718 | 678 |
|
719 | 679 | % gridfit renders without error |
|
0 commit comments