1616 .figurepair { display : table; margin : 1em auto; }
1717 .figurepair .figure { display : table-cell; }
1818 h2 , .example { clear : both; }
19- img , object { max-width : 100% ; }
19+ img , object { max-width : 100% ; display : block; margin : 1 em auto; }
2020 </ style >
2121 < link href ="http://www.w3.org/StyleSheets/TR/W3C-ED.css " rel =stylesheet
2222 type ="text/css ">
2828
2929 < h1 > CSS Writing Modes Module Level 3</ h1 >
3030
31- < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 2 March 2011</ h2 >
31+ < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 7 March 2011</ h2 >
3232
3333 < dl >
3434 < dt > This version:
3535
3636 < dd > < a
3737 href ="http://dev.w3.org/csswg/css3-writing-modes/ "> http://dev.w3.org/csswg/css3-writing-modes/</ a >
3838 <!--
39- <dd><a href="http://www.w3.org/TR/2011/WD-css3-writing-modes-20110302 ">http://www.w3.org/TR/2011/ED-css3-writing-modes-20110302 </a>
39+ <dd><a href="http://www.w3.org/TR/2011/WD-css3-writing-modes-20110307 ">http://www.w3.org/TR/2011/ED-css3-writing-modes-20110307 </a>
4040-->
4141
4242
@@ -192,7 +192,7 @@ <h2 class="no-num no-toc" id=Contents>Table of Contents</h2>
192192 < li > < a href ="#intro-text-layout "> < span class =secno > 5. </ span > Introduction
193193 to Intrinsic Text Layout</ a >
194194 < ul class =toc >
195- < li > < a href ="#text-orientation "> < span class =secno > 5.1. </ span > Orienting
195+ < li > < a href ="#text-orientation "> < span class =secno > 5.1. </ span > Orienting
196196 Text: the ‘< code class =property > text-orientation</ code > ’
197197 property</ a >
198198 </ ul >
@@ -259,7 +259,11 @@ <h2 class="no-num no-toc" id=Contents>Table of Contents</h2>
259259
260260 < li class =no-num > < a href ="#bidi-html "> Appendix B: Bidi Rules for HTML</ a >
261261
262- < li class =no-num > < a href ="#references "> References</ a >
262+ < li class =no-num > < a href ="#appendix-a-script-orientations "> Appendix A:
263+ Script Orientations</ a >
264+
265+ < li class =no-num > < a href ="#appendix-b-references "> Appendix B:
266+ References</ a >
263267 < ul class =toc >
264268 < li class =no-num > < a href ="#normative-references "> Normative
265269 references</ a >
@@ -359,7 +363,7 @@ <h2 id=text-flow><span class=secno>1. </span>Introduction to Writing Modes</h2>
359363 version</ a > ) for a more in-depth introduction to writing modes and
360364 vertical text.
361365
362- < p class =issue > Point at Intro to Text Orientaiton section once it's
366+ < p class =issue > Point at Intro to Text Orientation section once it's
363367 written.
364368
365369 < h2 id =text-direction > < span class =secno > 2. </ span > Inline Direction and
@@ -807,7 +811,7 @@ <h2 id=vertical-intro><span class=secno>3. </span> Introduction to Vertical
807811 vertical text layout in CSS.
808812
809813 < p > Unlike languages that use the Latin script which are primarily laid out
810- horizontally, Asian languages such as Chinese and Japanese can be laid
814+ horizontally, Asian languages such as Chinese and Japanese can be laid out
811815 vertically. The Japanese example below shows the same text laid out
812816 horizontally and vertically. In the horizontal case, text is read from
813817 left to right, top to bottom. For the vertical case, the text is read top
@@ -1274,9 +1278,86 @@ <h3 id=baseline-alignment><span class=secno>4.4. </span> Baseline Alignment</h3>
12741278 < h2 id =intro-text-layout > < span class =secno > 5. </ span > Introduction to
12751279 Intrinsic Text Layout</ h2 >
12761280
1277- < p > [Describe here any necessary concepts from UTN22]
1281+ < p > Each writing system has one or more native orientations. Modern scripts
1282+ can therefore be classified into three orientational categories:
1283+
1284+ < dl >
1285+ < dt > horizontal-only
1286+
1287+ < dd > Scripts that have horizontal, but not vertical, native orientation.
1288+ Includes: Latin, Arabic, Hebrew, Devanagari
1289+
1290+ < dt > vertical-only
1291+
1292+ < dd > Scripts that have vertical, but not horizontal, native orientation.
1293+ Includes: Mongolian, Manchu
1294+
1295+ < dt > bi-orientational
1296+
1297+ < dd > Scripts that have both vertical and horizontal native orientation.
1298+ Includes: Han, Hangul, Japanese Kana
1299+ </ dl >
1300+
1301+ < p > In modern typographic systems, all glyphs are assigned a horizontal
1302+ orientation, which is used when laying out text horizontally. To lay out
1303+ vertical text, the UA needs to transform the text from its horizontal
1304+ orientation. This transformation is the < dfn
1305+ id =bi-orientational-transform > bi-orientational transform</ dfn > , and there
1306+ are two types:
1307+
1308+ < dl >
1309+ < dt > rotate
1310+
1311+ < dd > Rotate the glyph from horizontal to vertical < object class =figure
1312+ data ="diagrams/glyph-right.svg " height =80 type ="image/svg+xml "
1313+ width =110 > </ object >
1314+
1315+ < dt > translate
1316+
1317+ < dd > Translate the glyph from horizontal to vertical < object class =figure
1318+ data ="diagrams/glyph-upright.svg " height =110 type ="image/svg+xml "
1319+ width =80 > </ object >
1320+ </ dl >
1321+
1322+ < p > Scripts with a native vertical orientation have an intrinsic
1323+ bi-orientational transform, which orients them correctly in vertical text:
1324+ CJK (Chinese/Japanese/Korean) characters translate, that is, they are
1325+ always upright. Other scripts, such as Mongolian, rotate. (See < a
1326+ href =script-orientations > Appendix A</ a > for a list of intrinsic
1327+ bi-orientational transforms.)
1328+
1329+ < p > Scripts without a native vertical orientation can be either rotated or
1330+ translated: the transform used is a stylistic preference depending on the
1331+ text's usage, rather than a matter of correctness. The ‘< a
1332+ href ="#text-orientation0 "> < code
1333+ class =property > text-orientation</ code > </ a > ’ property's ‘< a
1334+ href ="#vertical-right "> < code class =css > vertical-right</ code > </ a > ’
1335+ and ‘< a href ="#upright "> < code class =css > upright</ code > </ a > ’
1336+ values are provided to specify rotation vs. translation of horizontal-only
1337+ text.
12781338
1279- < h3 id =text-orientation > < span class =secno > 5.1. </ span > Orienting Text: the
1339+ < p class =note > The ‘< a href ="#rotate-left "> < code
1340+ class =css > rotate-left</ code > </ a > ’, ‘< a
1341+ href ="#rotate-right "> < code class =css > rotate-right</ code > </ a > ’, and
1342+ ‘< a href ="#rotate-normal "> < code
1343+ class =css > rotate-normal</ code > </ a > ’ values of ‘< a
1344+ href ="#text-orientation0 "> < code
1345+ class =property > text-orientation</ code > </ a > ’ are provided for
1346+ decorative layout effects and to work around limitations in CSS support
1347+ for bottom-to-top scripts.
1348+
1349+ < p class =issue > Ideally, punctuation should be either rotated or set
1350+ vertically depending on whether the primary script is horizontal-only or
1351+ vertical. However, this information (which, like the base directionality,
1352+ is a property of the content) is not available to us. (UTN 22 used the
1353+ concept of a vertical directionality, given via ‘< a
1354+ href ="#direction0 "> < code class =property > direction</ code > </ a > ’ or the
1355+ HTML < code > dir</ code > attribute to handle this issue.) The current spec
1356+ works around this by using the East Asian Width property; but this
1357+ approach only works if vertical scripts do not share punctuation with
1358+ horizontal-only scripts.
1359+
1360+ < h3 id =text-orientation > < span class =secno > 5.1. </ span > Orienting Text: the
12801361 ‘< a href ="#text-orientation0 "> < code
12811362 class =property > text-orientation</ code > </ a > ’ property</ h3 >
12821363
@@ -1333,27 +1414,26 @@ <h3 id=text-orientation><span class=secno>5.1. </span>Orienting Text: the
13331414 < dt > < dfn id =vertical-right > vertical-right</ dfn >
13341415
13351416 < dd >
1336- < p > In vertical writing modes, grapheme clusters from scripts that do not
1337- have an intrinsic vertical orientation are rotated 90° clockwise
1338- from their standard orientation in horizontal text. Characters from
1339- scripts that do have an intrinsic vertical orientation are set in that
1340- orientation. When available, vertical glyph variants and vertical font
1341- metrics are used to set all punctuation and characters from any script
1342- that is not rotated. In vertical writing modes, this value puts the
1343- element in a < i > vertical typographic mode</ i > and is typical for layout
1344- of primarily vertical-script text.
1417+ < p > In vertical writing modes, grapheme clusters from horizontal-only
1418+ scripts are rotated 90° clockwise from their standard orientation in
1419+ horizontal text. Characters from vertical scripts are set with their
1420+ intrinsic orientation.
1421+
1422+ < p > In vertical writing modes, this value puts the element in a
1423+ < i > vertical typographic mode</ i > and is typical for layout of primarily
1424+ vertical-script text.
13451425
13461426 < dt > < dfn id =upright > upright</ dfn >
13471427
13481428 < dd >
1349- < p > In vertical writing modes, grapheme clusters that do not have an
1350- intrinsic vertical orientation are rendered upright, i.e. in their
1351- standard horizontal orientation. Shaping characters from such scripts
1352- are shaped in their isolated forms. Characters from scripts that do have
1353- an intrinsic vertical orientation are set in that orientation . When
1354- available, vertical glyph variants and vertical font metrics are used to
1355- set the text. The UA should synthesize vertical font metrics for
1356- grapheme clusters that do not have any.
1429+ < p > In vertical writing modes, grapheme clusters from horizonal-only
1430+ scripts are rendered upright, i.e. in their standard horizontal
1431+ orientation. Shaping characters from such scripts are shaped in their
1432+ isolated forms. Characters from vertical scripts are set with their
1433+ intrinsic orientation and shaped normally . When available, vertical
1434+ glyph variants and vertical font metrics are used to set the text. The
1435+ UA must synthesize vertical font metrics for grapheme clusters that do
1436+ not have any.
13571437
13581438 < p > For the purposes of bidi reordering, this value causes all characters
13591439 to be treated as strong LTR. This value causes the used value of
@@ -1443,11 +1523,35 @@ <h3 id=text-orientation><span class=secno>5.1. </span>Orienting Text: the
14431523 and rotate-right</ p >
14441524 </ div >
14451525
1446- < p class =issue > Baseline alignment is not yet defined.
1447-
1448- < p class =issue > Add section explaining native script orientations. Note that
1449- all wide characters are treated the same as ideographic. Link to
1450- definition of grapheme clusters in < a href ="#UAX29 "
1526+ < p > In vertical typographic modes, any grapheme clusters belonging to a
1527+ vertical script < em > must</ em > be set using its intrinsic orientation. (See
1528+ < a href ="#script-orientations "> Appendix B</ a > .) An exception is made for
1529+ halfwidth forms belonging to the hiragana, katakana, and hangul scripts,
1530+ which may be set rotated. < span class =issue > What is the appropriate
1531+ behavior here? Or is there none?</ span > Grapheme clusters belonging to
1532+ other scripts must be rotated (for ‘< a href ="#vertical-right "> < code
1533+ class =css > vertical-right</ code > </ a > ’) or set upright (for ‘< a
1534+ href ="#upright "> < code class =css > upright</ code > </ a > ’). An exception
1535+ is made for characters with a fullwidth (F) or wide (W) East Asian Width
1536+ property, which should be set upright (using vertical font settings). < a
1537+ href ="#UAX11 " rel =biblioentry > [UAX11]<!--{{!UAX11}}--> </ a >
1538+
1539+ < p > The orientation of characters belonging to the Common and Inherited
1540+ script categories is UA-dependent for vertical typographic modes. If the
1541+ font and font system support mixed-orientation typesetting (e.g. the
1542+ < code > vrt2</ code > feature in OpenType), the UA should rely on that feature
1543+ to set ‘< a href ="#vertical-right "> < code
1544+ class =css > vertical-right</ code > </ a > ’ text. Similarly if the font and
1545+ font system support upright typesetting (e.g. the < code > vert</ code >
1546+ feature in OpenType) then the UA should rely on that feature to set
1547+ ‘< a href ="#upright "> < code class =css > upright</ code > </ a > ’ text.
1548+ If the UA needs to synthesize such features (e.g. if an OpenType font has
1549+ only the < code > vert</ code > but not the < code > vrt2</ code > feature), then it
1550+ should set all Common and Inherited characters with an East Asian Width of
1551+ F or W vertically (i.e. upright, using vertical font settings if
1552+ available), and rotate the rest (using horizontal font settings).
1553+
1554+ < p class =issue > Link to definition of grapheme clusters in < a href ="#UAX29 "
14511555 rel =biblioentry > [UAX29]<!--{{!UAX29}}--> </ a > .
14521556
14531557 < p class =issue > Add appendix that describes interaction with OpenType
@@ -2480,7 +2584,79 @@ <h2 class=no-num id=bidi-html>Appendix B: Bidi Rules for HTML</h2>
24802584{ unicode-bidi: isolate; }
24812585 </ pre >
24822586
2483- < h2 class =no-num id =references > References</ h2 >
2587+ < h2 class =no-num id =appendix-a-script-orientations > Appendix A: Script
2588+ Orientations</ h2 >
2589+
2590+ < p > This appendix gives the orientational properties of vertical scripts in
2591+ < a href ="#UNICODE " rel =biblioentry > [UNICODE]<!--{{!UNICODE}}--> </ a > . Any
2592+ script not listed explicitly is assumed to be < i > horizontal-only</ i > . See
2593+ < a href ="#UAX24 " rel =biblioentry > [UAX24]<!--{{!UAX24}}--> </ a > for the list
2594+ of script names.
2595+
2596+ < table >
2597+ < thead >
2598+ < tr >
2599+ < th > Script Name
2600+
2601+ < th > Transform
2602+
2603+ < tbody >
2604+ < tr >
2605+ < td > Bopomofo
2606+
2607+ < td > translate
2608+
2609+ < tr >
2610+ < td > Hiragana
2611+
2612+ < td > translate
2613+
2614+ < tr >
2615+ < td > Katakana_Or_Hiragana
2616+
2617+ < td > translate
2618+
2619+ < tr >
2620+ < td > Katakana
2621+
2622+ < td > translate
2623+
2624+ < tr >
2625+ < td > Han
2626+
2627+ < td > translate
2628+
2629+ < tr >
2630+ < td > Hangul
2631+
2632+ < td > translate
2633+
2634+ < tr >
2635+ < td > Mongolian
2636+
2637+ < td > rotate
2638+
2639+ < tr >
2640+ < td > Phags_Pa
2641+
2642+ < td > rotate < span class =issue > ?</ span >
2643+
2644+ < tr >
2645+ < td > Yi
2646+
2647+ < td > translate
2648+ </ table >
2649+
2650+ < p class =note > Ogham is also a rotating bi-orientational script, but because
2651+ it is a bottom-to-top script for the purposes of this specification it is
2652+ treated as left-to-right horizontal. A future version of CSS may define
2653+ proper handling of bottom-to-top scripts. Authors can work around this
2654+ lack of support with the ‘< a href ="#rotate-left "> < code
2655+ class =css > rotate-left</ code > </ a > ’ value of ‘< a
2656+ href ="#text-orientation0 "> < code
2657+ class =property > text-orientation</ code > </ a > ’.
2658+
2659+ < h2 class =no-num id =appendix-b-references > Appendix B: References</ h2 >
24842660
24852661 < h3 class =no-num id =normative-references > Normative references</ h3 >
24862662 <!--begin-normative-->
@@ -2520,6 +2696,25 @@ <h3 class=no-num id=normative-references>Normative references</h3>
25202696 </ dd >
25212697 <!---->
25222698
2699+ < dt id =UAX11 > [UAX11]
2700+
2701+ < dd > Asmus Freytag. < a
2702+ href ="http://www.unicode.org/unicode/reports/tr11/tr11-8.html "> < cite > East
2703+ Asian Width.</ cite > </ a > 23 March 2001. Unicode Standard Annex #11. URL:
2704+ < a
2705+ href ="http://www.unicode.org/unicode/reports/tr11/tr11-8.html "> http://www.unicode.org/unicode/reports/tr11/tr11-8.html</ a >
2706+ </ dd >
2707+ <!---->
2708+
2709+ < dt id =UAX24 > [UAX24]
2710+
2711+ < dd > Mark Davis. < a
2712+ href ="http://www.unicode.org/unicode/reports/tr24/tr24-7.html "> < cite > Script
2713+ Names.</ cite > </ a > 28 March 2005. Unicode Standard Annex #24. URL: < a
2714+ href ="http://www.unicode.org/unicode/reports/tr24/tr24-7.html "> http://www.unicode.org/unicode/reports/tr24/tr24-7.html</ a >
2715+ </ dd >
2716+ <!---->
2717+
25232718 < dt id =UAX29 > [UAX29]
25242719
25252720 < dd > Mark Davis. < a
@@ -2529,6 +2724,17 @@ <h3 class=no-num id=normative-references>Normative references</h3>
25292724 href ="http://www.unicode.org/reports/tr29/tr29-17.html "> http://www.unicode.org/reports/tr29/tr29-17.html</ a >
25302725 </ dd >
25312726 <!---->
2727+
2728+ < dt id =UNICODE > [UNICODE]
2729+
2730+ < dd > The Unicode Consortium. < a
2731+ href ="http://www.unicode.org/unicode/standard/versions/enumeratedversions.html "> < cite > The
2732+ Unicode Standard.</ cite > </ a > 2003. Defined by: The Unicode Standard,
2733+ Version 4.0 (Boston, MA, Addison-Wesley, ISBN 0-321-18578-1), as updated
2734+ from time to time by the publication of new versions URL: < a
2735+ href ="http://www.unicode.org/unicode/standard/versions/enumeratedversions.html "> http://www.unicode.org/unicode/standard/versions/enumeratedversions.html</ a >
2736+ </ dd >
2737+ <!---->
25322738 </ dl >
25332739 <!--end-normative-->
25342740
0 commit comments