Skip to content

Commit fa4cf58

Browse files
committed
Add first cut of text-orientation property
1 parent 27dc7b4 commit fa4cf58

2 files changed

Lines changed: 243 additions & 22 deletions

File tree

css3-writing-modes/Overview.html

Lines changed: 152 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<h1>CSS Writing Modes Module Level 3</h1>
1717

18-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 28 September
18+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 30 September
1919
2010</h2>
2020

2121
<dl>
@@ -149,36 +149,43 @@ <h2 class="no-num no-toc" id=Contents>Contents</h2>
149149
class=secno>4.2. </span>Boxes with Orthogonal Writing Mode </a>
150150
</ul>
151151

152-
<li><a href="#text-combine"><span class=secno>5. </span>Glyph Composition:
152+
<li><a href="#orienting-text"><span class=secno>5. </span>Orienting
153+
Text</a>
154+
155+
<li><a href="#text-orientation-the-text-orientation-pr"><span
156+
class=secno>6. </span>Text Orientation: the &lsquo;<code
157+
class=property>text-orientation</code>&rsquo; property</a>
158+
159+
<li><a href="#text-combine"><span class=secno>7. </span>Glyph Composition:
153160
the &lsquo;<code class=property>text-combine</code>&rsquo; property</a>
154161

155-
<li><a href="#writing-mode-switching"><span class=secno>6.
162+
<li><a href="#writing-mode-switching"><span class=secno>8.
156163
</span>Proposals for Dealing with Writing Mode Switching</a>
157164
<ul class=toc>
158-
<li><a href="#logical-directional"><span class=secno>6.1. </span>Logical
165+
<li><a href="#logical-directional"><span class=secno>8.1. </span>Logical
159166
directional properties and values</a>
160167
<ul class=toc>
161-
<li><a href="#logical-terminology"><span class=secno>6.1.1.
168+
<li><a href="#logical-terminology"><span class=secno>8.1.1.
162169
</span>Terminology</a>
163170

164-
<li><a href="#logical-prop"><span class=secno>6.1.2. </span>Logical
171+
<li><a href="#logical-prop"><span class=secno>8.1.2. </span>Logical
165172
properties: &lsquo;<code class=property>margin-before</code>&rsquo;,
166173
&lsquo;<code class=property>logical-width</code>&rsquo;, etc.</a>
167174

168-
<li><a href="#logical-value"><span class=secno>6.1.3. </span>Logical
175+
<li><a href="#logical-value"><span class=secno>8.1.3. </span>Logical
169176
property values: before, after, start, end</a>
170177
</ul>
171178

172-
<li><a href="#directional-modes"><span class=secno>6.2.
179+
<li><a href="#directional-modes"><span class=secno>8.2.
173180
</span>Directional Mode Switch</a>
174181
<ul class=toc>
175-
<li><a href="#directional-mode"><span class=secno>6.2.1.
182+
<li><a href="#directional-mode"><span class=secno>8.2.1.
176183
</span>Specifying Directional Mode: the &lsquo;<code
177184
class=property>directional-mode</code>&rsquo; property</a>
178185
</ul>
179186
</ul>
180187

181-
<li><a href="#appendix-b-bidi-rules-for-html"><span class=secno>7.
188+
<li><a href="#appendix-b-bidi-rules-for-html"><span class=secno>9.
182189
</span>Appendix B: Bidi Rules for HTML</a>
183190
</ul>
184191
<!--end-toc-->
@@ -190,6 +197,9 @@ <h2 id=intro><span class=secno>1. </span>Introduction</h2>
190197
(e.g., Hebrew or Arabic), bidirectional (e.g., mixing Latin with Arabic)
191198
and vertical (e.g., Asian scripts).
192199

200+
<p>Inherently bottom-to-top scripts are not handled in this version. See
201+
[[UTN22]] for an explanation of relevant issues.
202+
193203
<h2 id=text-flow><span class=secno>2. </span>Writing Modes and Terminology</h2>
194204

195205
<p>A <dfn id=writing-mode0>writing mode</dfn> is defined in terms of its
@@ -244,6 +254,10 @@ <h2 id=text-flow><span class=secno>2. </span>Writing Modes and Terminology</h2>
244254
flow</dfn> (which is leftward or rightward block flow). To avoid
245255
confusion, this specification avoids the latter set of terms.</span>
246256

257+
<p>See Unicode Technical Note #22 [[UTN22]] (<a
258+
href="http://fantasai.inkedblade.net/style/discuss/vertical-text/paper">HTML
259+
version</a>) for a more in-depth introduction to vertical text.
260+
247261
<h2 id=text-direction><span class=secno>3. </span>Inline Direction and
248262
Bidirectionality</h2>
249263

@@ -832,7 +846,8 @@ <h3 id=box-model-in-vertical-writing-modes><span class=secno>4.1.
832846
column ordering) depend instead on the effective physical directionality
833847
(top-to-bottom or bottom-to-top) to choose between top and bottom. Note
834848
that the effective physical directionality can be affected by the
835-
&lsquo;<code class=property>text-orientation</code>&rsquo; property.
849+
&lsquo;<a href="#text-orientation"><code
850+
class=property>text-orientation</code></a>&rsquo; property.
836851
</ul>
837852

838853
<h3 id=boxes-with-orthogonal-writing-mode-><span class=secno>4.2.
@@ -879,7 +894,121 @@ <h3 id=boxes-with-orthogonal-writing-mode-><span class=secno>4.2.
879894
src=vertical-lr.png width=300></p>
880895
</div>
881896

882-
<h2 id=text-combine><span class=secno>5. </span>Glyph Composition: the
897+
<h2 id=orienting-text><span class=secno>5. </span>Orienting Text</h2>
898+
899+
<h2 id=text-orientation-the-text-orientation-pr><span class=secno>6.
900+
</span>Text Orientation: the &lsquo;<a href="#text-orientation"><code
901+
class=property>text-orientation</code></a>&rsquo; property</h2>
902+
903+
<table class=propdef>
904+
<tbody>
905+
<tr>
906+
<th>Name:
907+
908+
<td><dfn id=text-orientation>text-orientation</dfn>
909+
910+
<tr>
911+
<th>Value:
912+
913+
<td>right | upright
914+
915+
<tr>
916+
<th>Initial:
917+
918+
<td>right
919+
920+
<tr>
921+
<th>Applies to:
922+
923+
<td>all elements except table row groups, rows, column groups, and
924+
columns
925+
926+
<tr>
927+
<th>Inherited:
928+
929+
<td>yes
930+
931+
<tr>
932+
<th>Percentages:
933+
934+
<td>N/A
935+
936+
<tr>
937+
<th>Media:
938+
939+
<td>visual
940+
941+
<tr>
942+
<th>Computed&#160;value:
943+
944+
<td>specified value
945+
</table>
946+
947+
<p>This property specifies the orientation of characters in a non-native
948+
&lsquo;<a href="#writing-mode1"><code
949+
class=property>writing-mode</code></a>&rsquo;. Values have the following
950+
meanings:
951+
952+
<dl>
953+
<dt>right
954+
955+
<dd>
956+
<p>In vertical writing modes, grapheme clusters from scripts that do not
957+
have an intrinsic vertical orientation are rotated 90&deg; clockwise
958+
from their standard orientation in horizontal text. When available,
959+
vertical glyph variants and vertical font metrics are used to set text
960+
that is not rotated.
961+
962+
<p>This value has no effect in horizontal writing modes.</p>
963+
<span class=issue>Better name? Need smarter selection of vertical glyph
964+
variants, e.g. glyphs should be rotated within non-vertical-script
965+
excerpts.</span>
966+
967+
<dt>upright
968+
969+
<dd>
970+
<p>In vertical writing modes, grapheme clusters that do not have an
971+
intrinsic vertical orientation are rendered upright, i.e. in their
972+
standard horizontal orientation. Shaping characters are shaped in their
973+
isolated forms. When available, vertical glyph variants and vertical
974+
font metrics are used to set the text. The UA should synthesize vertical
975+
font metrics for grapheme clusters that do not have any.
976+
977+
<p>For the purposes of bidi reordering, this value causes all strong RTL
978+
characters to be treated as LTR and AN digits to be treated as EN. If
979+
set on inline elements whose &lsquo;<a href="#unicode-bidi0"><code
980+
class=property>unicode-bidi</code></a>&rsquo; property is not
981+
&lsquo;<code class=property>normal</code>&rsquo; or &lsquo;<code
982+
class=property>bidi-override</code>&rsquo;, or on elements that are not
983+
inline this value causes the used value of &lsquo;<a
984+
href="#direction0"><code class=property>direction</code></a>&rsquo; to
985+
be &lsquo;<code class=css>ltr</code>&rsquo;.
986+
</dl>
987+
988+
<p><a href="#SVG11" rel=biblioentry>[SVG11]<!--{{!SVG11}}--></a> defines
989+
&lsquo;<code class=property>glyph-orientation-vertical</code>&rsquo; and
990+
&lsquo;<code class=property>glyph-orientation-horizontal</code>&rsquo;
991+
properties that were intended to control text orientation. These
992+
properties are <em>deprecated</em> and do not apply to non-SVG elements.
993+
Implementations that wish to support these properties in conjunction with
994+
&lsquo;<a href="#text-orientation"><code
995+
class=property>text-orientation</code></a>&rsquo; must introduce an
996+
&lsquo;<code class=css>auto</code>&rsquo; value for &lsquo;<a
997+
href="#text-orientation"><code
998+
class=property>text-orientation</code></a>&rsquo;, which is set by the UA
999+
default style sheet on all <a
1000+
href="http://www.w3.org/TR/SVG/intro.html#TermTextContentElement">SVG text
1001+
content elements</a> and which indicates that the SVG &lsquo;<code
1002+
class=property>glyph-orientation-vertical</code>&rsquo; and &lsquo;<code
1003+
class=property>glyph-orientation-horizontal</code>&rsquo; behavior
1004+
controls the layout of text. In all other contexts the &lsquo;<code
1005+
class=css>auto</code>&rsquo; behavior is the same as for &lsquo;<code
1006+
class=css>right</code>&rsquo;.
1007+
1008+
<p class=issue>Add appendex that describes interaction with OpenType
1009+
features?
1010+
1011+
<h2 id=text-combine><span class=secno>7. </span>Glyph Composition: the
8831012
&lsquo;<a href="#text-combine0"><code
8841013
class=property>text-combine</code></a>&rsquo; property</h2>
8851014

@@ -962,8 +1091,9 @@ <h2 id=text-combine><span class=secno>5. </span>Glyph Composition: the
9621091
<p>If the length of the element's contents exceeds the element's used
9631092
line-height, then its contents are instead rendered as if &lsquo;<a
9641093
href="#text-combine0"><code class=css>text-combine</code></a>&rsquo;
965-
were &lsquo;<code class=css>none</code>&rsquo; and &lsquo;<code
966-
class=css>text-orientation</code>&rsquo; were &lsquo;<code
1094+
were &lsquo;<code class=css>none</code>&rsquo; and &lsquo;<a
1095+
href="#text-orientation"><code
1096+
class=css>text-orientation</code></a>&rsquo; were &lsquo;<code
9671097
class=css>upright</code>&rsquo;. This fallback behavior is also
9681098
triggered if the element contains anything other than text.
9691099

@@ -988,19 +1118,19 @@ <h2 id=text-combine><span class=secno>5. </span>Glyph Composition: the
9881118
<p>In Japanese, this effect is known as <i lang=ja>tate-chu-yoko</i>.
9891119
</div>
9901120

991-
<h2 id=writing-mode-switching><span class=secno>6. </span>Proposals for
1121+
<h2 id=writing-mode-switching><span class=secno>8. </span>Proposals for
9921122
Dealing with Writing Mode Switching</h2>
9931123

9941124
<p class=issue>NOTE: These are only proposals for dealing with writing mode
9951125
switching. The CSS Working Group has not endorsed any of them yet, and
9961126
that they are very likely to be removed at any time.
9971127

998-
<h3 id=logical-directional><span class=secno>6.1. </span>Logical
1128+
<h3 id=logical-directional><span class=secno>8.1. </span>Logical
9991129
directional properties and values</h3>
10001130

10011131
<p class=issue>NOTE: This is only a proposal under discussion.
10021132

1003-
<h4 id=logical-terminology><span class=secno>6.1.1. </span>Terminology</h4>
1133+
<h4 id=logical-terminology><span class=secno>8.1.1. </span>Terminology</h4>
10041134

10051135
<p>In this section we use the following terminology about directional
10061136
properties:
@@ -1103,7 +1233,7 @@ <h4 id=logical-terminology><span class=secno>6.1.1. </span>Terminology</h4>
11031233
</pre>
11041234
</div>
11051235

1106-
<h4 id=logical-prop><span class=secno>6.1.2. </span>Logical properties:
1236+
<h4 id=logical-prop><span class=secno>8.1.2. </span>Logical properties:
11071237
&lsquo;<a href="#margin-before"><code
11081238
class=property>margin-before</code></a>&rsquo;, &lsquo;<a
11091239
href="#logical-width"><code
@@ -1678,7 +1808,7 @@ <h4 id=logical-prop><span class=secno>6.1.2. </span>Logical properties:
16781808
<p>The writing-mode value of the element is used for the mapping of
16791809
corresponding properties and therefore must be evaluated first.
16801810

1681-
<h4 id=logical-value><span class=secno>6.1.3. </span>Logical property
1811+
<h4 id=logical-value><span class=secno>8.1.3. </span>Logical property
16821812
values: before, after, start, end</h4>
16831813

16841814
<p>Properties that accept physical directional values (top, bottom, left,
@@ -1701,7 +1831,7 @@ <h4 id=logical-value><span class=secno>6.1.3. </span>Logical property
17011831
<li>&lsquo;<code class=property>caption-side</code>&rsquo;
17021832
</ul>
17031833

1704-
<h3 id=directional-modes><span class=secno>6.2. </span>Directional Mode
1834+
<h3 id=directional-modes><span class=secno>8.2. </span>Directional Mode
17051835
Switch</h3>
17061836

17071837
<p class=issue>NOTE: This is only a proposal under discussion.
@@ -1748,7 +1878,7 @@ <h3 id=directional-modes><span class=secno>6.2. </span>Directional Mode
17481878
href="#writing-mode1"><code class=property>writing-mode</code></a>&rsquo;
17491879
and get fallback to horizontal writing mode, the common styles are kept.
17501880

1751-
<h4 id=directional-mode><span class=secno>6.2.1. </span>Specifying
1881+
<h4 id=directional-mode><span class=secno>8.2.1. </span>Specifying
17521882
Directional Mode: the &lsquo;<a href="#directional-mode1"><code
17531883
class=property>directional-mode</code></a>&rsquo; property</h4>
17541884

@@ -1991,7 +2121,7 @@ <h4 id=directional-mode><span class=secno>6.2.1. </span>Specifying
19912121
</pre>
19922122
</div>
19932123

1994-
<h2 id=appendix-b-bidi-rules-for-html><span class=secno>7. </span>Appendix
2124+
<h2 id=appendix-b-bidi-rules-for-html><span class=secno>9. </span>Appendix
19952125
B: Bidi Rules for HTML</h2>
19962126

19972127
<p>The style sheet rules that would achieve the bidi behaviors specified in

0 commit comments

Comments
 (0)