You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Horizontal-in-Vertical Composition: the <spanclass=propertydata-link-type=propdesctitle=text-combine-horizontal>text-combine-horizontal</span> property</a><ulclass=toc><li><ahref=#text-combine-compression><spanclass=secno>9.1.1</span>
Horizontal-in-Vertical Composition: the <spanclass=propertydata-link-type=propdesctitle=text-combine-horizontal>text-combine-horizontal</span> property</a><ulclass=toc><li><ahref=#text-combine-layout><spanclass=secno>9.1.1</span>
<p>In order to preserve typographic color when compressing the text to 1em,
2325
-
when the combined text consists of more than one <ahref=#character>character</a>,
2326
-
then any full-width <ahref=#character>characters</a> must first be converted to their non-full-width equivalents
2327
-
by reversing the algorithm defined for <aclass=cssdata-link-type=maybehref=http://dev.w3.org/csswg/css-text-3/#text-transform0title=text-transform>text-transform: full-width</a> in <adata-biblio-type=normativedata-link-type=bibliohref=#css3texttitle=CSS3TEXT>[CSS3TEXT]</a>.
2328
-
2329
-
<divclass=example>
2330
-
<p>For example, an author might apply both <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-text-3/#text-transform0title=text-transform>text-transform</a> and <aclass=propertydata-link-type=propdeschref=#propdef-text-combine-horizontaltitle=text-combine-horizontal>text-combine-horizontal</a>
2331
-
to a date set in vertical text.
2332
-
<pre>date { text-combine-horizontal: digits 2; text-transform: full-width; }</pre><p>Suppose this style rule is applied to a date such as.
2333
-
<pre><date>2010年2月23日</date></pre><p>The "2010" is too long to be combined (4 digits), but the "2" and "23" will be affected.
2334
-
Since "23" is more than one character, it will not be affected by <aclass=cssdata-link-type=maybehref=http://dev.w3.org/csswg/css-text-3/#text-transform0title=text-transform>text-transform: full-width</a>.
2335
-
However since the "2" is only one character, it will be transformed to a fullwidth "2".
2336
-
Since the "2010" was not combined, its digits, too, will be transformed to fullwidth "2010";
2337
-
and being fullwidth, they will be typeset upright, giving the following result:
2338
-
<prestyle="text-align: center"><!-- -->2
2339
-
<!-- -->0
2340
-
<!-- -->1
2341
-
<!-- -->0
2342
-
<!-- -->年
2343
-
<!-- -->2
2344
-
<!-- -->月
2345
-
<!-- -->23
2346
-
<!-- -->日</pre></div>
2347
-
<!--
2348
-
Also, a <a property>font-variant</a> value of <span data-link-type="maybe" class="css">full-width</span> must be ignored in such cases:
2349
-
whether applied via <span data-link-type="maybe" class="css">@font-face</span> descriptor or property declaration,
2350
-
within the combined text this value does not not cause the UA to enable that font feature. [[!CSS3-FONTS]]
2351
-
-->
2352
-
2353
-
<pclass=note>
2354
-
Full-width glyph variations can also be chosen via the <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-fonts-3/#descdef-font-varianttitle=font-variant>font-variant</a> property
2355
-
or <aclass=cssdata-link-type=maybehref=http://dev.w3.org/csswg/css-fonts-3/#at-font-face-rule>@font-face</a> descriptor <adata-biblio-type=normativedata-link-type=bibliohref=#css3-fontstitle=CSS3-FONTS>[CSS3-FONTS]</a>.
2356
-
However since such variations do not affect the glyph shape in contemporary fonts,
2357
-
there is no explicit interaction with this feature currently.
2358
-
A future revision of this specification may require ignoring such declarations
<p>When combining text as for <aclass=cssdata-link-type=maybehref=#propdef-text-combine-horizontaltitle=text-combine-horizontal>text-combine-horizontal: all</a>,
2363
2328
the glyphs of the combined text are composed horizontally
<p>In order to preserve typographic color when compressing the text to 1em,
2388
+
when the combined text consists of more than one <ahref=#character>character</a>,
2389
+
then any full-width <ahref=#character>characters</a> must first be converted to their non-full-width equivalents
2390
+
by reversing the algorithm defined for <aclass=cssdata-link-type=maybehref=http://dev.w3.org/csswg/css-text-3/#text-transform0title=text-transform>text-transform: full-width</a> in <adata-biblio-type=normativedata-link-type=bibliohref=#css3texttitle=CSS3TEXT>[CSS3TEXT]</a>
2391
+
before applying other compression techniques.
2392
+
2393
+
<divclass=example>
2394
+
<p>For example, an author might apply both <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-text-3/#text-transform0title=text-transform>text-transform</a> and <aclass=propertydata-link-type=propdeschref=#propdef-text-combine-horizontaltitle=text-combine-horizontal>text-combine-horizontal</a>
2395
+
to a date set in vertical text.
2396
+
<pre>date { text-combine-horizontal: digits 2; text-transform: full-width; }</pre><p>Suppose this style rule is applied to a date such as.
2397
+
<pre><date>2010年2月23日</date></pre><p>The "2010" is too long to be combined (4 digits), but the "2" and "23" will be affected.
2398
+
Since "23" is more than one character, it will not be affected by <aclass=cssdata-link-type=maybehref=http://dev.w3.org/csswg/css-text-3/#text-transform0title=text-transform>text-transform: full-width</a>.
2399
+
However since the "2" is only one character, it will be transformed to a fullwidth "2".
2400
+
Since the "2010" was not combined, its digits, too, will be transformed to fullwidth "2010";
2401
+
and being fullwidth, they will be typeset upright, giving the following result:
2402
+
<prestyle="text-align: center"><!-- -->2
2403
+
<!-- -->0
2404
+
<!-- -->1
2405
+
<!-- -->0
2406
+
<!-- -->年
2407
+
<!-- -->2
2408
+
<!-- -->月
2409
+
<!-- -->23
2410
+
<!-- -->日</pre></div>
2411
+
<!--
2412
+
Also, a <a property>font-variant</a> value of <span data-link-type="maybe" class="css">full-width</span> must be ignored in such cases:
2413
+
whether applied via <span data-link-type="maybe" class="css">@font-face</span> descriptor or property declaration,
2414
+
within the combined text this value does not not cause the UA to enable that font feature. [[!CSS3-FONTS]]
2415
+
-->
2416
+
2417
+
<pclass=note>
2418
+
Full-width glyph variations can also be chosen via the <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-fonts-3/#descdef-font-varianttitle=font-variant>font-variant</a> property
2419
+
or <aclass=cssdata-link-type=maybehref=http://dev.w3.org/csswg/css-fonts-3/#at-font-face-rule>@font-face</a> descriptor <adata-biblio-type=normativedata-link-type=bibliohref=#css3-fontstitle=CSS3-FONTS>[CSS3-FONTS]</a>.
2420
+
However since such variations do not affect the glyph shape in contemporary fonts,
2421
+
there is no explicit interaction with this feature currently.
2422
+
A future revision of this specification may require ignoring such declarations
2423
+
within the combined text
2424
+
if common usage makes such behavior desirable.
2425
+
2416
2426
<!--
2417
2427
<h3 id="text-combine-mode">
2418
2428
Horizontal-in-Vertical Glyph Scaling: the 'text-combine-mode' property</h3>
0 commit comments