Commit 5eeb967
committed
Engine: fixed auto-outline for fonts with glyphs with negative offsets
Some rare fonts may have glyphs that have negative offsets, that is - their leftmost pixels lie to the left from the "pen" position (requested top-left text render coords).
We may learn this by reading font's BBox.
This commit fixes this problem for the auto-outlining. But the general issue still remains: if such text is positioned too close to the leftmost border of a parent surface (gui control, overlay, etc), then there's a chance that parts of the letter will be cut off.
This issue cannot be resolved without displacing text further from its starting draw position. But that may go against text rendering logic, and produce effects unexpected to the user. So I'll leave that for the future consideration.1 parent 7fa0d6a commit 5eeb967
File tree
6 files changed
+45
-20
lines changed- Common
- font
- gui
- libsrc/alfont-2.0.9
- Engine/ac
6 files changed
+45
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
414 | 421 | | |
415 | 422 | | |
416 | 423 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
864 | 864 | | |
865 | 865 | | |
866 | 866 | | |
867 | | - | |
| 867 | + | |
868 | 868 | | |
869 | 869 | | |
870 | 870 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
540 | 544 | | |
541 | 545 | | |
542 | 546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
657 | | - | |
658 | | - | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
659 | 661 | | |
660 | 662 | | |
661 | 663 | | |
662 | | - | |
| 664 | + | |
| 665 | + | |
663 | 666 | | |
664 | 667 | | |
665 | | - | |
| 668 | + | |
666 | 669 | | |
667 | 670 | | |
668 | 671 | | |
669 | | - | |
670 | | - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
671 | 678 | | |
672 | 679 | | |
673 | 680 | | |
| |||
681 | 688 | | |
682 | 689 | | |
683 | 690 | | |
684 | | - | |
685 | | - | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
686 | 694 | | |
687 | 695 | | |
688 | | - | |
| 696 | + | |
689 | 697 | | |
690 | 698 | | |
691 | 699 | | |
| |||
713 | 721 | | |
714 | 722 | | |
715 | 723 | | |
| 724 | + | |
| 725 | + | |
716 | 726 | | |
717 | 727 | | |
718 | 728 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2414 | 2414 | | |
2415 | 2415 | | |
2416 | 2416 | | |
2417 | | - | |
| 2417 | + | |
2418 | 2418 | | |
2419 | 2419 | | |
2420 | 2420 | | |
| |||
0 commit comments