Skip to content

Commit c092e61

Browse files
committed
[css-text] Fix up wording for 'text-justify'
1 parent c4d4611 commit c092e61

2 files changed

Lines changed: 78 additions & 88 deletions

File tree

css-text/Overview.html

Lines changed: 49 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2132,13 +2132,14 @@ <h3 id=text-justify><span class=secno>7.3. </span> Justification Method:
21322132
class=css>inter-word</code>’ for English, etc. Another possibility is
21332133
to use a justification method that is a simple universal compromise for
21342134
all writing systems, such as primarily expanding <a
2135-
href="#word-separator"><i>word separators</i></a> along with expanding
2136-
between CJK and Southeast Asian <a href="#letter0"><i>letters</i></a>.
2135+
href="#word-separator"><i>word separators</i></a> along with secondarily
2136+
expanding between CJK and Southeast Asian <a
2137+
href="#letter0"><i>letters</i></a>.
21372138

21382139
<div class=figure id=fig-text-justify-cursive>
21392140
<p> <img
21402141
alt="Two lines of calligraphic Arabic end together due to a mix of compressed and swash forms."
2141-
class=example src=text-justify-cursive.png
2142+
src=text-justify-cursive.png
21422143
title="Swash forms elongate the first line while a compressed contextual ligature shortens the second, allowing both to end precisely together.">
21432144

21442145
<p class=caption>An example of cursively-justified Arabic text rendered
@@ -2148,7 +2149,7 @@ <h3 id=text-justify><span class=secno>7.3. </span> Justification Method:
21482149
<div class=figure id=fig-text-justify-compromise>
21492150
<p> <img
21502151
alt="Extra space is partly to spaces and partly among CJK and Thai letters."
2151-
class=example src=text-justify-compromise.png>
2152+
src=text-justify-compromise.png>
21522153

21532154
<p class=caption>Mixed-script text with ‘<code class=css>text-justify:
21542155
auto</code>’: this interpretation uses a universal-compromise
@@ -2166,15 +2167,15 @@ <h3 id=text-justify><span class=secno>7.3. </span> Justification Method:
21662167
<dt><dfn id=inter-word title="text-justify:inter-word"><code
21672168
class=css>inter-word</code></dfn>
21682169

2169-
<dd>Justification primarily varies the used ‘<a
2170-
href="#word-spacing0"><code class=property>word-spacing</code></a>;
2171-
the first-level <a href="#expansion-opportunity"><i>expansion
2172-
opportunities</i></a> are at <a href="#word-separator"><i>word
2173-
separators</i></a>. This behavior is typical for languages that separate
2174-
words using spaces, like English or Korean.
2170+
<dd>Justification varies the used ‘<a href="#word-spacing0"><code
2171+
class=property>word-spacing</code></a> on the line, i.e. the primary
2172+
<a href="#expansion-opportunity"><i>expansion opportunities</i></a> are
2173+
at <a href="#word-separator"><i>word separators</i></a>. This behavior is
2174+
typical for languages that separate words using spaces, like English or
2175+
Korean.
21752176
<div class=figure id=fig-text-justify-interword>
21762177
<p> <img alt="Extra space is equally distributed mainly to spaces."
2177-
class=example src=text-justify-interword.png>
2178+
src=text-justify-interword.png>
21782179

21792180
<p class=caption>Mixed-script text with ‘<code class=css>text-justify:
21802181
inter-word</code>
@@ -2195,18 +2196,19 @@ <h3 id=text-justify><span class=secno>7.3. </span> Justification Method:
21952196
<dt><dfn id=distribute title="text-justify:distribute"><code
21962197
class=css>distribute</code></dfn>
21972198

2198-
<dd>Justification primarily varies the used ‘<a
2199-
href="#letter-spacing0"><code
2200-
class=property>letter-spacing</code></a>’; the first-level <a
2201-
href="#expansion-opportunity"><i>expansion opportunities</i></a> are
2202-
between adjacent <a href="#character"><i>characters</i></a> (except
2203-
between <a href="#letter0"><i>letters</i></a> in <a
2204-
href="#cursive-scripts"><i>cursive scripts</i></a> such as Arabic). This
2205-
value is sometimes used in e.g. Japanese.
2199+
<dd>Justification varies the spacing between adjacent <a
2200+
href="#character"><i>characters</i></a> (except between <a
2201+
href="#letter0"><i>letters</i></a> in <a
2202+
href="#cursive-scripts"><i>cursive scripts</i></a> such as Arabic), i.e.
2203+
the primary <a href="#expansion-opportunity"><i>expansion
2204+
opportunities</i></a> are between adjacent <a
2205+
href="#character"><i>characters</i></a> where both <a
2206+
href="#character"><i>characters</i></a> in the pair are
2207+
non-<i>cursive</i>. This value is sometimes used in e.g. Japanese.
22062208
<div class=figure id=fig-text-justify-distribute>
22072209
<p> <img
22082210
alt="Extra space is equally distributed at points between spaces and letters of all writing systems."
2209-
class=example src=text-justify-distribute.png>
2211+
src=text-justify-distribute.png>
22102212

22112213
<p class=caption>Mixed-script text with ‘<code class=css>text-justify:
22122214
distribute</code>
@@ -2227,7 +2229,7 @@ <h3 id=text-justify><span class=secno>7.3. </span> Justification Method:
22272229
<div class="figure" id="fig-text-justify">
22282230
<p>
22292231
<img alt="Examples of text-justify values commonly used in East Asian scripts"
2230-
class="example" src="text-justify-east-asia.png" height="376" width="491"></p>
2232+
src="text-justify-east-asia.png" height="376" width="491"></p>
22312233
<p class="caption">Values of 'text-justify': ''inter-word'', ''auto'', and ''distribute''</p>
22322234
</div>
22332235
-->
@@ -2268,30 +2270,18 @@ <h3 id=text-justify><span class=secno>7.3. </span> Justification Method:
22682270
letter spacing.
22692271
</div>
22702272

2271-
<p>CSS defines <dfn id=expansion-opportunity
2272-
title="expansion opportunity">expansion opportunities</dfn> as points
2273-
where the justification algorithm may alter spacing within the text. <a
2274-
href="#expansion-opportunity"><i>Expansion opportunities</i></a> are
2275-
divided into different priority levels: within a level, all <a
2276-
href="#expansion-opportunity"><i>expansion opportunities</i></a> are
2277-
expanded or compressed at the same priority, with space distributed in
2278-
proportion to the <a href="#expansion-opportunity"><i>expansion
2279-
opportunity</i></a>’s ‘<code class=property>font-size</code>’. In
2280-
the case of an <a href="#expansion-opportunity"><i>expansion
2281-
opportunity</i></a> introduced by a single <a
2282-
href="#character"><i>character</i></a>, (as with ‘<a
2283-
href="#word-spacing0"><code class=property>word-spacing</code></a>’) the
2284-
<code class=property>font-size</code>’ of that <a
2285-
href="#character"><i>character</i></a> is used; in the case of an <a
2286-
href="#expansion-opportunity"><i>expansion opportunity</i></a> between <a
2287-
href="#character"><i>characters</i></a>, (as with ‘<a
2288-
href="#letter-spacing0"><code class=property>letter-spacing</code></a>’)
2289-
the ‘<code class=property>font-size</code>’ of the innermost element
2290-
containing their boundary is used.
2291-
2292-
<p>Characters from the Unicode Symbols (S*) and Punctuation (P*) classes
2293-
are generally treated the same as a <a href="#letter0"><i>letter</i></a>;
2294-
in the case of ‘<code class=css>inter-word</code>’, as a Latin <a
2273+
<p>An <dfn id=expansion-opportunity>expansion opportunity</dfn> is a point
2274+
where the justification algorithm may alter spacing within the text. The
2275+
UA divides <a href="#expansion-opportunity"><i>expansion
2276+
opportunities</i></a> into different priority levels: within a level, all
2277+
<a href="#expansion-opportunity"><i>expansion opportunities</i></a> are
2278+
expanded or compressed at the same priority.
2279+
2280+
<p>When determining <a href="#expansion-opportunity"><i>expansion
2281+
opportunities</i></a>, characters from the Unicode Symbols (S*) and
2282+
Punctuation (P*) classes are generally treated the same as a <a
2283+
href="#letter0"><i>letter</i></a>: in the case of ‘<code
2284+
class=css>inter-word</code>’, as a Latin <a
22952285
href="#letter0"><i>letter</i></a>, in the case of ‘<code
22962286
class=css>distribute</code>’, as a Han <a
22972287
href="#letter0"><i>letter</i></a>, and in the case of ‘<a
@@ -2308,21 +2298,24 @@ <h3 id=text-justify><span class=secno>7.3. </span> Justification Method:
23082298
consecutive EM DASH U+2014, HORIZONTAL BAR U+2015, HORIZONTAL ELLIPSIS
23092299
U+2026, or TWO DOT LEADER U+2025 characters <a href="#JLREQ"
23102300
rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a>; thus a UA might assign these
2311-
characters to a "never" prioritization level. As another example, certain
2312-
fullwidth punctuation characters are considered to contain an <a
2301+
characters to a never prioritization level. As another example,
2302+
certain fullwidth punctuation characters are considered to contain an <a
23132303
href="#expansion-opportunity"><i>expansion opportunity</i></a> in
23142304
Japanese. The UA might therefore assign these characters to a higher
23152305
prioritization level than the opportunities between ideographic
23162306
characters.
23172307

2318-
<p>The <a href="#word-spacing">word-spacing</a> property can specify limits
2319-
on <a href="#expansion-opportunity"><i>expansion opportunities</i></a>
2308+
<p>The ‘<a href="#word-spacing0"><code
2309+
class=property>word-spacing</code></a>’ property can specify limits on
2310+
<a href="#expansion-opportunity"><i>expansion opportunities</i></a>
23202311
introduced by <a href="#word-separator"><i>word separators</i></a>. How
23212312
any remaining space is distributed once all <a
23222313
href="#expansion-opportunity"><i>expansion opportunities</i></a> reach
2323-
their limits is up to the UA. If the inline contents of a line cannot be
2324-
stretchedto the full width of the line box, then they must be aligned as
2325-
specified by the ‘<a href="#text-align-last0"><code
2314+
their limits is up to the UA.
2315+
2316+
<p>If the inline contents of a line cannot be stretched to the full width
2317+
of the line box, then they must be aligned as specified by the ‘<a
2318+
href="#text-align-last0"><code
23262319
class=property>text-align-last</code></a>’ property. (If ‘<a
23272320
href="#text-align-last0"><code
23282321
class=property>text-align-last</code></a>’ is ‘<code
@@ -2472,10 +2465,6 @@ <h3 id=text-justify><span class=secno>7.3. </span> Justification Method:
24722465
characters of these scripts.
24732466
-->
24742467

2475-
<p>The UA may enable or break optional ligatures or use other font features
2476-
such as alternate glyphs or glyph compression to help justify the text
2477-
under any method. This behavior is not controlled by this level of CSS.
2478-
24792468
<div class=example>
24802469
<p>3.8 Line Adjustment in <a href="#JLREQ"
24812470
rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a> gives an example of a set of
@@ -2525,6 +2514,10 @@ <h3 id=text-justify><span class=secno>7.3. </span> Justification Method:
25252514
</ol>
25262515
--></div>
25272516

2517+
<p>The UA may enable or break optional ligatures or use other font features
2518+
such as alternate glyphs or glyph compression to help justify the text
2519+
under any method. This behavior is not controlled by this level of CSS.
2520+
25282521
<h2 id=spacing><span class=secno>8. </span> Spacing</h2>
25292522

25302523
<p>CSS offers control over text spacing via the ‘<a

css-text/Overview.src.html

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,20 +1582,20 @@ <h3 id="text-justify">
15821582
Another possibility is to use a justification method that is a
15831583
simple universal compromise for all writing systems,
15841584
such as primarily expanding <i>word separators</i>
1585-
along with expanding between CJK and Southeast Asian <i>letters</i>.</p>
1585+
along with secondarily expanding between CJK and Southeast Asian <i>letters</i>.
15861586

15871587
<div class="figure" id="fig-text-justify-cursive">
15881588
<p>
15891589
<img alt="Two lines of calligraphic Arabic end together due to a mix of compressed and swash forms."
15901590
title="Swash forms elongate the first line while a compressed contextual ligature shortens the second, allowing both to end precisely together."
1591-
class="example" src="text-justify-cursive.png"></p>
1591+
src="text-justify-cursive.png"></p>
15921592
<p class="caption">An example of cursively-justified Arabic text rendered by <a href="http://www.decotype.com/">Tasmeem</a>.
15931593
</div>
15941594

15951595
<div class="figure" id="fig-text-justify-compromise">
15961596
<p>
15971597
<img alt="Extra space is partly to spaces and partly among CJK and Thai letters."
1598-
class="example" src="text-justify-compromise.png"></p>
1598+
src="text-justify-compromise.png"></p>
15991599
<p class="caption">Mixed-script text with ''text-justify: auto'':
16001600
this interpretation uses a universal-compromise justification method,
16011601
expanding at spaces as well as between CJK and Southeast Asian letters.
@@ -1606,14 +1606,14 @@ <h3 id="text-justify">
16061606
to improve readability or for accessibility purposes.
16071607

16081608
<dt><dfn title="text-justify:inter-word">''inter-word''</dfn></dt>
1609-
<dd>Justification primarily varies the used 'word-spacing';
1610-
the first-level <i>expansion opportunities</i> are at <i>word separators</i>.
1609+
<dd>Justification varies the used 'word-spacing' on the line, i.e.
1610+
the primary <i>expansion opportunities</i> are at <i>word separators</i>.
16111611
This behavior is typical for languages that separate words using spaces,
16121612
like English or Korean.
16131613
<div class="figure" id="fig-text-justify-interword">
16141614
<p>
16151615
<img alt="Extra space is equally distributed mainly to spaces."
1616-
class="example" src="text-justify-interword.png"></p>
1616+
src="text-justify-interword.png"></p>
16171617
<p class="caption">Mixed-script text with ''text-justify: inter-word''
16181618
</div>
16191619
<!--
@@ -1629,14 +1629,15 @@ <h3 id="text-justify">
16291629
This value is typically used for Southeast Asian scripts such as Thai.</dd>
16301630
-->
16311631
<dt><dfn title="text-justify:distribute">''distribute''</dfn></dt>
1632-
<dd>Justification primarily varies the used 'letter-spacing';
1633-
the first-level <i>expansion opportunities</i> are between adjacent <i>characters</i>
1634-
(except between <i>letters</i> in <i>cursive scripts</i> such as Arabic).
1632+
<dd>Justification varies the spacing between adjacent <i>characters</i>
1633+
(except between <i>letters</i> in <i>cursive scripts</i> such as Arabic),
1634+
i.e. the primary <i>expansion opportunities</i> are between adjacent <i>characters</i>
1635+
where both <i>characters</i> in the pair are non-<i>cursive</i>.
16351636
This value is sometimes used in e.g. Japanese.
16361637
<div class="figure" id="fig-text-justify-distribute">
16371638
<p>
16381639
<img alt="Extra space is equally distributed at points between spaces and letters of all writing systems."
1639-
class="example" src="text-justify-distribute.png"></p>
1640+
src="text-justify-distribute.png"></p>
16401641
<p class="caption">Mixed-script text with ''text-justify: distribute''
16411642
</div>
16421643
<!--
@@ -1656,7 +1657,7 @@ <h3 id="text-justify">
16561657
<div class="figure" id="fig-text-justify">
16571658
<p>
16581659
<img alt="Examples of text-justify values commonly used in East Asian scripts"
1659-
class="example" src="text-justify-east-asia.png" height="376" width="491"></p>
1660+
src="text-justify-east-asia.png" height="376" width="491"></p>
16601661
<p class="caption">Values of 'text-justify': ''inter-word'', ''auto'', and ''distribute''</p>
16611662
</div>
16621663
-->
@@ -1693,19 +1694,15 @@ <h3 id="text-justify">
16931694
to <i>word separators</i> than letter spacing.
16941695
</div>
16951696

1696-
<p>CSS defines <dfn id="expansion-opportunity" title="expansion opportunity">expansion opportunities</dfn>
1697-
as points where the justification algorithm may alter spacing within the text.
1698-
<i>Expansion opportunities</i> are divided into different priority levels:
1697+
<p>An <dfn>expansion opportunity</dfn> is
1698+
a point where the justification algorithm may alter spacing within the text.
1699+
The UA divides <i>expansion opportunities</i> into different priority levels:
16991700
within a level, all <i>expansion opportunities</i> are
1700-
expanded or compressed at the same priority,
1701-
with space distributed in proportion to the <i>expansion opportunity</i>’s 'font-size'.
1702-
In the case of an <i>expansion opportunity</i> introduced by a single <i>character</i>,
1703-
(as with 'word-spacing') the 'font-size' of that <i>character</i> is used;
1704-
in the case of an <i>expansion opportunity</i> between <i>characters</i>,
1705-
(as with 'letter-spacing') the 'font-size' of the innermost element containing their boundary is used.
1706-
1707-
<p>Characters from the Unicode Symbols (S*) and Punctuation (P*) classes
1708-
are generally treated the same as a <i>letter</i>;
1701+
expanded or compressed at the same priority.
1702+
1703+
<p>When determining <i>expansion opportunities</i>,
1704+
characters from the Unicode Symbols (S*) and Punctuation (P*) classes
1705+
are generally treated the same as a <i>letter</i>:
17091706
in the case of ''inter-word'', as a Latin <i>letter</i>,
17101707
in the case of ''distribute'', as a Han <i>letter</i>,
17111708
and in the case of ''auto'', as a <i>letter</i> of the dominant script.
@@ -1719,23 +1716,23 @@ <h3 id="text-justify">
17191716
For example, there are traditionally no <i>expansion opportunities</i>
17201717
between consecutive EM DASH U+2014, HORIZONTAL BAR U+2015, HORIZONTAL
17211718
ELLIPSIS U+2026, or TWO DOT LEADER U+2025 characters [[JLREQ]]; thus
1722-
a UA might assign these characters to a "never" prioritization level.
1719+
a UA might assign these characters to a never prioritization level.
17231720
As another example, certain fullwidth punctuation characters are
17241721
considered to contain an <i>expansion opportunity</i> in Japanese.
17251722
The UA might therefore assign these characters to a higher prioritization
17261723
level than the opportunities between ideographic characters.
17271724

1728-
<p>The <a href="#word-spacing">word-spacing</a> property can specify limits on
1725+
<p>The 'word-spacing' property can specify limits on
17291726
<i>expansion opportunities</i> introduced by <i>word separators</i>.
17301727
How any remaining space is distributed once all <i>expansion opportunities</i>
17311728
reach their limits is up to the UA.
1732-
If the inline contents of a line cannot be stretchedto the full width of the line box,
1729+
1730+
<p>If the inline contents of a line cannot be stretched to the full width of the line box,
17331731
then they must be aligned as specified by the 'text-align-last' property.
17341732
(If 'text-align-last' is ''justify'', then
17351733
they must be aligned as for ''center'' if 'text-justify' is ''distribute'',
17361734
and as ''start'' otherwise.)
17371735

1738-
17391736
<!--
17401737
<p>The <i>expansion opportunity</i> priorities for values of 'text-justify'
17411738
are given in the table below. Since justification behavior
@@ -1879,11 +1876,6 @@ <h3 id="text-justify">
18791876
characters of these scripts.
18801877
-->
18811878

1882-
<p>The UA may enable or break optional ligatures or use other font
1883-
features such as alternate glyphs or glyph compression to help
1884-
justify the text under any method. This behavior is not controlled by
1885-
this level of CSS.</p>
1886-
18871879
<div class="example">
18881880
<p>3.8 Line Adjustment in [[JLREQ]] gives an example of a set of rules for
18891881
how a text formatter can justify Japanese text.
@@ -1931,6 +1923,11 @@ <h3 id="text-justify">
19311923
-->
19321924
</div>
19331925

1926+
<p>The UA may enable or break optional ligatures or use other font
1927+
features such as alternate glyphs or glyph compression to help
1928+
justify the text under any method. This behavior is not controlled by
1929+
this level of CSS.
1930+
19341931
<h2 id="spacing">
19351932
Spacing</h2>
19361933

0 commit comments

Comments
 (0)