@@ -19,6 +19,7 @@ Abstract: This module describes the rendering model and formatting controls rela
1919</pre>
2020<pre class=link-defaults>
2121spec:css-text-3; type:dfn; text:character
22+ spec:css-box-4; type:dfn; text:content area
2223</pre>
2324
2425
@@ -440,10 +441,10 @@ Annotation Pairing</h3>
440441 However, if there are multiple [=annotation levels=] ,
441442 it can be associated with multiple [=ruby annotations=] .
442443
443- Once [=pairing=] is complete, <dfn local-lt=column>ruby column </dfn> units are defined,
444+ Once [=pairing=] is complete, <dfn local-lt=column>ruby columns </dfn> are defined,
444445 each represented by a single [=ruby base=]
445446 and one [=ruby annotation=] (possibly an empty, anonymous one)
446- from each [=annotation level=] in its [=ruby segment=] .
447+ from each [=interlinear=] [= annotation level=] in its [=ruby segment=] .
447448
448449<h4 id="segment-pairing">
449450Segment Pairing and Annotation Levels</h4>
@@ -692,7 +693,7 @@ Ruby Layout</h2>
692693 it is sized and positioned
693694 as if it contained a single empty [=ruby base=] .)
694695
695- [=Inter-linear =] [=ruby annotations=] within a level
696+ [=Interlinear =] [=ruby annotations=] within a level
696697 are aligned to each other in the block axis
697698 as if they were [=inline boxes=]
698699 participating in the same [=inline formatting context=] ,
@@ -772,20 +773,59 @@ Ruby Layout</h2>
772773Inter-character Ruby Layout</h3>
773774
774775 [=Inter-character annotations=] have special layout.
775- In [=horizontal writing mode=] ,
776- when the value 'ruby-position' is ''inter-character'' ,
777- the affected [=ruby annotation boxes=]
776+ [=Inter-character=] [=ruby annotation boxes=]
778777 are spliced into and measured as part of the layout of the [=base level=] .
779- The [=ruby base container=] must be sized to include both the [=ruby base boxes=]
780- as well as the ''inter-character'' [=ruby annotation boxes=] .
781- The affected [=ruby annotation container=] is similarly sized
782- so that its content box coincides with that of the [=ruby base container=] .
778+ Each [=ruby annotation=] is inserted to the right of the [=ruby base=] it is paired with;
779+ a [=spanning=] [=inter-character annotation=] is placed after
780+ the rightmost of all the bases that it spans.
781+ [=Inter-character=] [=ruby annotations=] are laid out
782+ exactly like [=inline blocks=] ,
783+ except as described below.
784+
785+ Note: As per the definition of ''inter-character'' ,
786+ [=inter-character annotations=] always have a ''vertical-rl'' 'writing-mode' ,
787+ and only exist in [=horizontal writing mode|horizontal=] [=ruby containers=] .
788+
789+ Each [=ruby annotation=] is placed immediately to the right of the relevant [=ruby base=] ,
790+ before any [=inter-base white space=] (or [=inter-segment white space=] ).
791+ If multiple [=inter-character=] [=ruby annotation boxes=] are placed against the same [=ruby base=] ,
792+ their [=margin boxes=] are stacked rightwards without intervening space,
793+ in increasing [=level=] order.
794+
795+ If the [=automatic size|automatic height=] of the [=ruby annotation box=] ’s [=content area=]
796+ would be shorter than the height of the [=content box=]
797+ of the [=ruby base=] after which it is placed,
798+ its [=content box=] height is increased to match that height exactly.
799+
800+ The alignment of the [=ruby annotation box=]
801+ depends on the 'ruby-align' property on the [=ruby annotation=] :
802+
803+ <ul>
804+ <li>
805+ If 'ruby-align' is ''ruby-align/start'' ,
806+ the top edge of the [=ruby annotation=] 's [=content box=] is aligned
807+ with the top edge of the [=ruby base=] 's [=content box=] .
808+
809+ <li>
810+ Otherwise,
811+ the center of the [=ruby annotation=] 's [=content box=] is vertically aligned
812+ with the center of the [=ruby base=] 's [=content box=] .
813+ </ul>
814+
815+ The [=ruby annotation container box=] of an [=inter-character=] annotation
816+ is sized and placed so that its content box coincides exactly with that of the [=ruby base container box=] .
817+
818+ Note: The size and position of [=inter-character=] [=ruby annotation container boxes=]
819+ has no effect on layout.
820+ The above definition is merely so that programmatically inquiring about them
821+ produces deterministic results.
822+
823+ For the purpose of [[#ruby-align-property|alignment]]
824+ and column sizing (as discussed in [[#ruby-layout]] ),
825+ [=inter-character=] [=ruby annotations=] are not considered
826+ to be part of the same [=column=] as the base to with they are attached;
827+ rather, they effectively form a [=column=] of their own.
783828
784- For the purpose of laying out other levels of annotations,
785- an [=inter-character annotation=] effectively becomes part of its base.
786- <span class="issue"> Or should it become a quasi-base between two bases?</span>
787- A spanning [=inter-character annotation=] is placed after
788- all the bases that it spans.
789829
790830<h3 id="box-style">
791831Styling Ruby Boxes</h3>
@@ -1108,9 +1148,8 @@ Ruby Positioning: the 'ruby-position' property</h3>
11081148 are called <dfn local-lt="interlinear">interlinear annotations</dfn> .
11091149
11101150 If multiple [=ruby annotation containers=] have the same 'ruby-position' ,
1111- they stack along the block axis for [=interlinear annotations=] ,
1112- and along the inline axis for [=inter-character annotations=] ,
1113- with lower levels of annotation closer to the base text.
1151+ they stack outwards from the base text.
1152+
11141153
11151154<h3 id="collapsed-ruby">
11161155Sharing Annotation Space: the 'ruby-merge' property</h3>
@@ -1212,8 +1251,11 @@ Ruby Text Distribution: the 'ruby-align' property</h3>
12121251 Note that space distributed by 'ruby-align' is unrelated to, and independent of,
12131252 any space distributed due to justification.
12141253
1215- Note: It is the content within the boxes that is aligned in the excess space,
1216- not the boxes themselves.
1254+ For [=inter-character=] annotations,
1255+ this property can also affect the alignment of the box itself
1256+ (see [[#inter-character-layout]] ).
1257+ It otherwise only affects the alignment of content within the box,
1258+ not the size or position of the box itself.
12171259
12181260 Values have the following meanings:
12191261 <dl dfn-for=ruby-align dfn-type=value>
0 commit comments