@@ -318,11 +318,6 @@ Anonymous Ruby Box Generation</h3>
318
318
This computation occurs after any intermediary anonymous-box fixup
319
319
(such as that required by internal table elements).
320
320
321
- <li id="anony-gen-trim-space"><strong> Trim leading/trailing white space:</strong>
322
- Any white space within a ruby structure is discarded
323
- at the beginning and end of
324
- a <i> ruby container</i> , <i> ruby annotation container</i> , or <i> ruby base container</i> .
325
-
326
321
<li id="anon-gen-bare-inlines"><strong> Wrap misparented inline-level content:</strong>
327
322
Any consecutive sequence of text and inline-level boxes
328
323
directly parented by a <i> ruby container</i> or <i> ruby base container</i>
@@ -333,10 +328,17 @@ Anonymous Ruby Box Generation</h3>
333
328
334
329
However, if an anonymous box so constructed contains only <i> white space</i> ,
335
330
it is considered <dfn>intra-ruby white space</dfn>
336
- and is either discarded as <i> inter-level white space </i>
337
- or preserved as <i> intra-level white space </i>
331
+ and is either discarded
332
+ or preserved
338
333
as described below.
339
334
335
+ <li id="anony-gen-trim-space"><strong> Trim leading/trailing white space:</strong>
336
+ Any <i> intra-ruby white space</i>
337
+ that is not the sole child of its parent
338
+ and occurs at the beginning or end of
339
+ a <i> ruby container</i> , <i> ruby annotation container</i> , or <i> ruby base container</i>
340
+ is removed, as if it had ''display: none''
341
+
340
342
<li id="anon-gen-discard-space"><strong> Remove inter-level white space:</strong>
341
343
Any <i> intra-ruby white space</i>
342
344
whose immediately adjacent siblings match one of the patterns below
@@ -391,7 +393,7 @@ Anonymous Ruby Box Generation</h3>
391
393
<tr><td><i> ruby base</i> or <i> ruby base container</i>
392
394
<td><i> ruby base container</i>
393
395
<tr><td><i> ruby base container</i>
394
- <td><i> ruby base container</i>
396
+ <td><i> ruby base</i> or <i> ruby base container</i>
395
397
</table>
396
398
The <dfn>intra-level white space</dfn> boxes defined above are
397
399
treated specially for pairing and layout. See below.
@@ -516,7 +518,7 @@ Unit Pairing and Spanning Annotations</h4>
516
518
<h4 id="nested-pairing">
517
519
Complex Spanning with Nested Ruby</h4>
518
520
519
- <p> <dfn lt="nested ruby"></dfn> When <i> ruby containers</i> are nested,
521
+ <p> When <i> ruby containers</i> are <dfn lt=" nested ruby">nested</dfn> ,
520
522
pairing begins with the deepest <i> ruby container</i> ,
521
523
then expands out.
522
524
From the pairing perspective of the outer <i> ruby container</i> ,
@@ -898,14 +900,6 @@ Line Spacing</h3>
898
900
Note, it is currently in the process of being rewritten;
899
901
the current drafts should not be relied upon.
900
902
901
- <h3 id="ruby-size">Ruby Annotation Font Size</h3>
902
- <p> The <i> ruby annotations</i> are usually the half size of the <i> ruby base</i> as described in [[!JLREQ]] .
903
- However, UA may increase the font size when the it is too small to read,
904
- or decrease if the text is too large to avoid ruby annotation being too large.
905
- Also, the 'ruby-position: inter-character' usually require different font size such as 25% or 33%.
906
- <p> This level of the specification does not define any additional mechanism to automatically compute
907
- the <i> ruby annotation</i> font size according to properties of <i> ruby container</i> or <i> ruby base</i> .
908
-
909
903
<h2 id="ruby-props">
910
904
Ruby Formatting Properties</h2>
911
905
@@ -1004,14 +998,6 @@ Ruby Positioning: the 'ruby-position' property</h3>
1004
998
<p class="caption"> “Bopomofo” ruby in traditional Chinese
1005
999
(ruby text shown in blue for clarity) in horizontal layout
1006
1000
</div>
1007
- <p class="note">
1008
- Note that the user agent is responsible for ensuring the correct relative alignment and positioning of the glyphs,
1009
- including those corresponding to the tone marks, when displaying.
1010
- Tone marks are spacing characters that occur (in memory) at the end of the ruby text for each base character.
1011
- They are usually displayed in a separate column to the right of the bopomofo characters,
1012
- and the height of the tone mark depends on the number of characters in the syllable.
1013
- One tone mark, however, is placed above the bopomofo, not to the right of it.
1014
- <!-- See Taiwanese requirements doc for EPUB at http://epub-revision.googlecode.com/files/EGLS_TW_eng.ppt -->
1015
1001
</dd>
1016
1002
</dl>
1017
1003
@@ -1505,18 +1491,17 @@ Appendix A: Default Style Sheet</h2>
1505
1491
<!-- -->rbc { display: ruby-base-container; }
1506
1492
<!-- -->rtc { display: ruby-text-container; }
1507
1493
<!-- -->rtc, rt { white-space: nowrap; font-size: 50%; line-height: 1; }
1494
+ <!-- -->rtc:lang(zh-TW), rt:lang(zh-TW) { font-size: 30%; } /* bopomofo */
1508
1495
<!-- -->rtc > rt { font-size: inherit; }
1496
+ <!-- -->rtc:lang(zh), rt:lang(zh) { ruby-align: center; }
1509
1497
<!-- -->ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }</pre>
1510
1498
1511
1499
<p> Additional rules for UAs supporting the relevant features of [[CSS3-TEXT-DECOR]] and [[CSS3-FONTS]] :
1512
1500
<pre> rtc, rt { font-variant-east-asian: ruby; text-emphasis: none; }</pre>
1513
1501
1514
- <p class="note"> Authors should not use the above rules;
1502
+ <p class="note"> Authors should not use the above rules:
1515
1503
a UA that supports ruby layout should provide these by default.
1516
1504
1517
- <p class="note"> For the use of the 'font-size' property,
1518
- please refer to <a href="#ruby-size">Ruby Annotation Font Size</a> .
1519
-
1520
1505
<h3 id="default-inline" class="no-num">
1521
1506
<span class="secno">A.2</span> Inlining Ruby Annotations</h3>
1522
1507
@@ -1556,7 +1541,16 @@ Glossary</h2>
1556
1541
<dl>
1557
1542
<dt id="g-bopomofo" lang="zh"> Bopomofo
1558
1543
<dd> 37 characters and 4 tone markings used as phonetics in Chinese,
1559
- especially standard Mandarin.</dd>
1544
+ especially standard Mandarin.
1545
+ <p class="note">
1546
+ Note that the user agent is responsible for ensuring the correct relative alignment and positioning of the glyphs,
1547
+ including bopomofo tone marks, when displaying text,
1548
+ whether it occurs in ruby annotations or as normal inline text.
1549
+ Bopomofo Tone marks are spacing characters that occur (in memory) at the end of the ruby text for each base character.
1550
+ They are usually displayed in a separate column to the right of or above the bopomofo characters,
1551
+ and the position of the tone mark depends on the number of characters in the syllable.
1552
+ One tone mark, however, is placed before the bopomofo, not over it.
1553
+ <!-- See Taiwanese requirements doc for EPUB at http://epub-revision.googlecode.com/files/EGLS_TW_eng.ppt -->
1560
1554
<dt id="g-hanja" lang="ko"> Hanja
1561
1555
<dd> Subset of the Korean writing system that utilizes ideographic
1562
1556
characters borrowed or adapted from the Chinese writing system. Also see
0 commit comments