|
3 | 3 | Issues: |
4 | 4 | bidi |
5 | 5 | box layout/sizing |
| 6 | + clean up inter-character vs. parallel layout requirements |
6 | 7 |
|
7 | 8 | Redo all examples with consistent font. (M+ 2p?) |
8 | 9 |
|
@@ -614,10 +615,92 @@ <h4 id="break-between"> |
614 | 615 | <h4 id="break-within"> |
615 | 616 | Breaking within bases</h4> |
616 | 617 |
|
617 | | - <p class="issue">Fill in this section... |
| 618 | + <p>For longer base texts, it is sometimes appropriate to allow breaking within a base-annotation pair. |
| 619 | + For example, if an English sentence is annotated with its Japanese translation, |
| 620 | + allowing the text to wrap allows for reasonable line breaking behavior in the paragraph. |
| 621 | + |
| 622 | + <p class="issue"> |
| 623 | + Insert scanned example so people don't think this is just the ramblings of an insane spec-writer. |
| 624 | + |
| 625 | + <p>Line-breaking within a <i>ruby base</i> is only allowed if the 'white-space' property |
| 626 | + of the <i>ruby base</i> and all its parallel <i>annotations</i> allow it, |
| 627 | + and there exists a <i>soft wrap opportunity</i> <em>within</em> (i.e. not at the start or end) |
| 628 | + the content of each base/annotation box. |
| 629 | + Since there is no structural correspondance between fragments of content |
| 630 | + within <i>ruby bases</i> and <i>annotations</i>, |
| 631 | + the UA may break at any set of opportunities; |
| 632 | + but it is recommended that the UA attempt to proportionally balance |
| 633 | + the amount of content inside each fragment. |
618 | 634 |
|
619 | 635 | <p>There are no line breaking opportunities within ''inter-character'' <i>annotations</i>. |
620 | 636 |
|
| 637 | + <p>Ruby alignment takes place within each fragment, after line-breaking. |
| 638 | + |
| 639 | +<h3 id="ruby-bidi"> |
| 640 | +Bidi Reordering</h3> |
| 641 | + |
| 642 | + <p class="issue">The easiest thing would be to treat each <i>ruby base</i> as an embedding of its 'direction'. |
| 643 | + But this means that implicit bidi reordering is scoped to within a single base. |
| 644 | + |
| 645 | + <p>The Unicode bidirectional algorithm orders logically-stored text for visual presentation |
| 646 | + when characters from scripts of opposing directionalities are mixed |
| 647 | + within a single paragraph. |
| 648 | + (See [[CSS3-WRITING-MODES]] for a more in-depth discussion of bidirectional text in CSS.) |
| 649 | + Bidi reordering of ruby-annotation pairs is controlled by the ordering of the base text, as follows: |
| 650 | + |
| 651 | +<h4 id="bidi-B">Proposal B</h4> |
| 652 | + |
| 653 | + <p class="note">This proposal is simpler, but will require more frequent tagging of mixed-directionality content. |
| 654 | + |
| 655 | + <p>To avoid the interference of the <i>annotations</i> in the ordering of base text, |
| 656 | + all annotations are ignored for the purpose of resolving neutral characters in the base level. |
| 657 | + |
| 658 | + <p>To preserve the correspondance of <i>ruby annotations</i> |
| 659 | + to their respective <i>ruby bases</i>, |
| 660 | + a few restrictions are imposed: |
| 661 | + <ul> |
| 662 | + <li>The contents of a <i>ruby base</i> must remain contiguous. |
| 663 | + To this end, the contents of |
| 664 | + <li>All <i>bases</i> spanned by a single <i>annotation</i> must remain contiguous. |
| 665 | + </ul> |
| 666 | + |
| 667 | + <li>When a <i>ruby base</i> is moved due to bidi reordering, |
| 668 | + all of its corresponding <i>ruby annotations</i> must follow. |
| 669 | + |
| 670 | +<h4 id="bidi-B">Proposal B</h4> |
| 671 | + |
| 672 | + <p class="note">This preserves some aspects of implicit bidi. |
| 673 | + For example, annotating each half of "first-second" would not cause the word to reverse itself to "second-first" within an opposite-order paragraph. |
| 674 | + |
| 675 | + <p>To avoid the interference of the <i>annotations</i> in the ordering of the base text, |
| 676 | + all annotations are ignored for the purpose of resolving neutral characters in the base text; |
| 677 | + and the base text is resolved exactly as if each <i>ruby base</i> were |
| 678 | + just a normal <i>inline box</i> embedded in the <i>ruby container</i>'s inline formatting context. |
| 679 | + |
| 680 | + <p>Furthermore, to preserve the correspondance of <i>ruby annotations</i> |
| 681 | + to their respective <i>ruby bases</i>, |
| 682 | + a few restrictions are imposed: |
| 683 | + <ul> |
| 684 | + <li> |
| 685 | + <li>The contents of a <i>ruby base</i> must remain contiguous. |
| 686 | + <li>All <i>bases</i> spanned by a single <i>annotation</i> must remain contiguous. |
| 687 | + </ul> |
| 688 | + <p>To this end, the text of <i>ruby base</i> boxes that are not <i>bidi-isolated</i> |
| 689 | + must have its embedding level increased by two; |
| 690 | + and if an <i>annotation</i> spans more than one <i>ruby base</i>, |
| 691 | + the spanned text's embedding level |
| 692 | + (or the embedding level assigned to the isolation, if the <i>ruby base</i> is <i>bidi-isolated</i>) |
| 693 | + is further increased by two. |
| 694 | + |
| 695 | + <p> |
| 696 | + |
| 697 | +<!-- |
| 698 | + <p> |
| 699 | + Each <i>ruby base</i> within a <i>ruby container</i> is treated |
| 700 | + as a strong character with the directionality of its 'direction' property. |
| 701 | + When resolving the embedding levels of |
| 702 | +--> |
| 703 | + |
621 | 704 | <h3 id="line-height"> |
622 | 705 | Ruby box and line stacking</h3> |
623 | 706 |
|
|
0 commit comments