Skip to content

Commit ae4fd5b

Browse files
committed
Clarifications to text-combine-horizontal; pull out technical details outside definition list; allow UA to not combine things that involve element boundaries
1 parent e401410 commit ae4fd5b

2 files changed

Lines changed: 50 additions & 38 deletions

File tree

css3-writing-modes/Overview.html

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2799,7 +2799,8 @@ <h2 id=text-combine><span class=secno>9. </span> Glyph Composition: the
27992799
space of a single character. For text layout purposes, e.g. bidi ordering,
28002800
line-breaking, emphasis marks, text-decoration, etc. the resulting
28012801
composition is treated as a single glyph representing the Object
2802-
Replacement Character U+FFFC. Values have the following meanings:
2802+
Replacement Character U+FFFC. This property only has an effect in vertical
2803+
writing modes. Values have the following meanings:
28032804

28042805
<dl>
28052806
<dt><dfn id=none title="text-combine-horizontal:none">none</dfn>
@@ -2811,24 +2812,7 @@ <h2 id=text-combine><span class=secno>9. </span> Glyph Composition: the
28112812
<dd>
28122813
<p>In vertical writing mode, attempt to display the text contents of the
28132814
element horizontally within the vertical line box, ideally within the
2814-
space of one ideographic character (1em square).
2815-
2816-
<p>The combined glyphs are stacked horizontally (similar to the contents
2817-
of an inline-box with a horizontal writing mode and a line-height of
2818-
1em) and the baseline of the resulting composition chosen such that it
2819-
is centered between the content edges of its parent inline box. The
2820-
effective height of the composition is assumed to be 1em square;
2821-
anything outside the square is not measured for layout purposes.
2822-
2823-
<p>Any CSS fullwidth transformations (&lsquo;<code
2824-
class=css>text-transform: full-width</code>&rsquo; <a href="#CSS3TEXT"
2825-
rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a> or &lsquo;<code
2826-
class=css>font-variant-east-asian-width: full-width</code>&rsquo; <a
2827-
href="#CSS3FONT" rel=biblioentry>[CSS3FONT]<!--{{CSS3FONT}}--></a>) are
2828-
turned off when the element contains more than one character.
2829-
2830-
<p>In horizontal mode, this value is equivalent to &lsquo;<code
2831-
class=css>none</code>&rsquo;.
2815+
space of one ideographic character (1em square). See below.
28322816

28332817
<dt><dfn id=digits title="text-combine-horizontal:digits">digits</dfn>
28342818

@@ -2867,15 +2851,36 @@ <h2 id=text-combine><span class=secno>9. </span> Glyph Composition: the
28672851
proportional glyphs, a three-digit number may use 1/3-em glyphs (if
28682852
available, else halfwidth glyphs), etc. If such glyphs are not available,
28692853
the UA must compress the composition horizontally until they fit within
2870-
the 1em square.
2854+
1em width.
28712855

28722856
<dt><dfn id=scale title="text-combine-horizontal:scale">scale</dfn>
2873-
Compress the composition horizontally until it fits within 1em square.
2857+
Compress the composition horizontally until it fits within 1em width.
28742858
</dl>
28752859

28762860
<p class=issue>Do we need a tolerance value for scaling? (e.g. 1.1 instead
28772861
of 1em)
28782862

2863+
<p>When combining text as for &lsquo;<code
2864+
class=css>text-combine-horizontal: all</code>&rsquo;, the glyphs of the
2865+
combined text are stacked horizontally, similar to the contents of an
2866+
inline-box with a horizontal writing mode and a line-height of 1em. The
2867+
effective size of the composition is assumed to be 1em square; anything
2868+
outside the square is not measured for layout purposes. The UA should
2869+
center the glyphs horizontally and vertically within the measured 1em
2870+
square. The baseline of the resulting composition chosen such that the
2871+
square is centered between the content edges of its parent inline box. Any
2872+
CSS fullwidth transformations (&lsquo;<code class=css>text-transform:
2873+
full-width</code>&rsquo; <a href="#CSS3TEXT"
2874+
rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a> or &lsquo;<code
2875+
class=css>font-variant-east-asian-width: full-width</code>&rsquo; <a
2876+
href="#CSS3FONT" rel=biblioentry>[CSS3FONT]<!--{{CSS3FONT}}--></a>) are
2877+
turned off when the element contains more than one character.
2878+
2879+
<p>UAs are not required to combine content that contains any element
2880+
boundaries: in such cases, the UA may treat such contents as for
2881+
&lsquo;<code class=css>text-combine-horizontal: none</code>&rsquo;.
2882+
Authors should beware that such contents may not be combined.
2883+
28792884
<div class=example>
28802885
<p>In East Asian documents, the &lsquo;<a
28812886
href="#text-combine-horizontal"><code

css3-writing-modes/Overview.src.html

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,28 +2093,16 @@ <h2 id="text-combine">
20932093
space of a single character. For text layout purposes, e.g. bidi
20942094
ordering, line-breaking, emphasis marks, text-decoration, etc. the
20952095
resulting composition is treated as a single glyph representing the
2096-
Object Replacement Character U+FFFC. Values have the following
2097-
meanings:</p>
2096+
Object Replacement Character U+FFFC. This property only has an effect
2097+
in vertical writing modes. Values have the following meanings:</p>
20982098

20992099
<dl>
21002100
<dt><dfn title="text-combine-horizontal:none">none</dfn>
21012101
<dd>No special processing.</dd>
21022102
<dt><dfn title="text-combine-horizontal:all">all</dfn>
21032103
<dd><p>In vertical writing mode, attempt to display the text contents
21042104
of the element horizontally within the vertical line box, ideally
2105-
within the space of one ideographic character (1em square).
2106-
<p>The combined glyphs are stacked
2107-
horizontally (similar to the contents of an inline-box with a
2108-
horizontal writing mode and a line-height of 1em) and the baseline
2109-
of the resulting composition chosen such that it is centered between
2110-
the content edges of its parent inline box. The effective height of
2111-
the composition is assumed to be 1em square; anything outside the
2112-
square is not measured for layout purposes.
2113-
<p>Any CSS fullwidth transformations
2114-
(''text-transform: full-width'' [[CSS3TEXT]] or
2115-
''font-variant-east-asian-width: full-width'' [[CSS3FONT]])
2116-
are turned off when the element contains more than one character.
2117-
<p>In horizontal mode, this value is equivalent to ''none''.
2105+
within the space of one ideographic character (1em square). See below.
21182106
<dt><dfn title="text-combine-horizontal:digits">digits</dfn>
21192107
<dd>Within the element, each sequence of consecutive horizontal digits
21202108
that has as many or fewer characters than the integer given (or 2,
@@ -2142,13 +2130,32 @@ <h2 id="text-combine">
21422130
halfwidth or proportional glyphs, a three-digit number may use 1/3-em glyphs
21432131
(if available, else halfwidth glyphs), etc.
21442132
If such glyphs are not available, the UA must compress the composition
2145-
horizontally until they fit within the 1em square.
2133+
horizontally until they fit within 1em width.
21462134
<dt><dfn title="text-combine-horizontal:scale">scale</dfn>
2147-
Compress the composition horizontally until it fits within 1em square.
2135+
Compress the composition horizontally until it fits within 1em width.
21482136
</dl>
21492137

21502138
<p class="issue">Do we need a tolerance value for scaling? (e.g. 1.1 instead of 1em)
21512139

2140+
<p>When combining text as for ''text-combine-horizontal: all'', the
2141+
glyphs of the combined text are stacked horizontally, similar to
2142+
the contents of an inline-box with a horizontal writing mode and
2143+
a line-height of 1em. The effective size of the composition is
2144+
assumed to be 1em square; anything outside the square is not
2145+
measured for layout purposes. The UA should center the glyphs
2146+
horizontally and vertically within the measured 1em square.
2147+
The baseline of the resulting composition chosen such that the
2148+
square is centered between the content edges of its parent inline
2149+
box. Any CSS fullwidth transformations
2150+
(''text-transform: full-width'' [[CSS3TEXT]] or
2151+
''font-variant-east-asian-width: full-width'' [[CSS3FONT]])
2152+
are turned off when the element contains more than one character.
2153+
2154+
<p>UAs are not required to combine content that contains any
2155+
element boundaries: in such cases, the UA may treat such contents
2156+
as for 'text-combine-horizontal: none'. Authors should beware that
2157+
such contents may not be combined.
2158+
21522159
<div class="example">
21532160
<p>In East Asian documents, the ''text-combine-horizontal'' effect is often
21542161
used to display Latin-based strings such as components of a date or

0 commit comments

Comments
 (0)