Skip to content

Commit cabb525

Browse files
committed
[css-fonts-4] Merge font-variant-east-asian from CSS Fonts 3 #1653
1 parent 9003e97 commit cabb525

5 files changed

Lines changed: 106 additions & 0 deletions

File tree

css-fonts-4/Overview.bs

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4582,6 +4582,112 @@ span.alt-U {
45824582
<h3 id="font-variant-east-asian-prop">
45834583
East Asian text rendering: the 'font-variant-east-asian' property</h3>
45844584

4585+
4586+
<pre class="propdef">
4587+
Name: font-variant-east-asian
4588+
4589+
Value: normal | [ <<east-asian-variant-values>> || <<east-asian-width-values>> || ruby ]
4590+
Initial: normal
4591+
Applies to: all elements
4592+
Inherited: yes
4593+
Percentages: n/a
4594+
Computed value: as specified
4595+
Animation type: discrete
4596+
</pre>
4597+
4598+
4599+
<p>Allows control of glyph substitution and sizing in East Asian text.</p>
4600+
4601+
<pre class="prod"><dfn id="east-asian-variant-values"><var>&lt;east-asian-variant-values&gt;</var></dfn> = [ <span>jis78</span> | <span>jis83</span> | <span>jis90</span> | <span>jis04</span> | <span>simplified</span> | <span>traditional</span> ]</pre>
4602+
4603+
<pre class="prod"><dfn id="east-asian-width-values"><var>&lt;east-asian-width-values&gt;</var></dfn> = [ <span>full-width</span> | <span>proportional-width</span> ]</pre>
4604+
4605+
<p>Individual values have the following meanings:</p>
4606+
4607+
4608+
<dl dfn-for="font-variant-east-asian" dfn-type="value">
4609+
<dt><dfn id="font-variant-east-asian-normal-value" title="normal!!font-variant-east-asian">normal</dfn>
4610+
<dd>None of the features listed below are enabled.</dd>
4611+
4612+
<dt><dfn>jis78</dfn>
4613+
<dd>Enables rendering of JIS78 forms
4614+
(OpenType feature: <span class="tag">jp78</span>).</dd>
4615+
4616+
<div class="featex"><img alt="JIS78 form example" src="images/jp78.png"></div>
4617+
4618+
<dt><dfn>jis83</dfn>
4619+
<dd>Enables rendering of JIS83 forms
4620+
(OpenType feature: <span class="tag">jp83</span>).</dd>
4621+
4622+
<dt><dfn>jis90</dfn>
4623+
<dd>Enables rendering of JIS90 forms
4624+
(OpenType feature: <span class="tag">jp90</span>).</dd>
4625+
4626+
<dt><dfn>jis04</dfn>
4627+
<dd>Enables rendering of JIS2004 forms
4628+
(OpenType feature: <span class="tag">jp04</span>).
4629+
4630+
<p>The various JIS variants reflect
4631+
the glyph forms defined in different Japanese national standards.
4632+
Fonts generally include glyphs
4633+
defined by the most recent national standard,
4634+
but it's sometimes necessary
4635+
to use older variants,
4636+
to match signage for example.</p>
4637+
</dd>
4638+
4639+
<dt><dfn>simplified</dfn>
4640+
<dd>Enables rendering of simplified forms
4641+
(OpenType feature: <span class="tag">smpl</span>).
4642+
4643+
<dt><dfn>traditional</dfn>
4644+
<dd>Enables rendering of traditional forms
4645+
(OpenType feature: <span class="tag">trad</span>).</dd>
4646+
4647+
<p>The 'simplified' and 'traditional' values
4648+
allow control over the glyph forms
4649+
for characters which have been simplified over time
4650+
but for which the older, traditional form
4651+
is still used in some contexts.
4652+
The exact set of characters and glyph forms
4653+
will vary to some degree
4654+
by the context for which a given font was designed.</p>
4655+
</dd>
4656+
4657+
<div class="featex"><img alt="tradtional form example" src="images/trad.png"></div>
4658+
4659+
<dt><dfn>full-width</dfn>
4660+
<dd>Enables rendering of full-width variants
4661+
(OpenType feature: <span class="tag">fwid</span>).</dd>
4662+
4663+
<dt><dfn>proportional-width</dfn>
4664+
<dd>Enables rendering of proportionally-spaced variants
4665+
(OpenType feature: <span class="tag">pwid</span>).</dd>
4666+
4667+
<div class="featex"><img alt="proportionally spaced Japanese example" src="images/pwid.png"></div>
4668+
4669+
<dt><dfn>ruby</dfn>
4670+
<dd>Enables display of ruby variant glyphs
4671+
(OpenType feature: <span class="tag">&#x0072;uby</span>).
4672+
Since ruby text is generally smaller
4673+
than the associated body text,
4674+
font designers can design special glyphs for use with ruby
4675+
that are more readable than scaled down versions
4676+
of the default glyphs.
4677+
Only glyph selection is affected,
4678+
there is no associated font scaling
4679+
or other change that affects line layout.
4680+
4681+
The red ruby text below
4682+
is shown with default glyphs (top)
4683+
and with ruby variant glyphs (bottom).
4684+
Note the slight difference
4685+
in stroke thickness.</dd>
4686+
4687+
<div class="featex"><img alt="ruby variant example" src="images/rubyshinkansen.png"></div>
4688+
4689+
</dl>
4690+
45854691
<h3 id="font-variant-prop">
45864692
Overall shorthand for font rendering: the 'font-variant!!property' property</h3>
45874693

css-fonts-4/images/jp78.png

4.76 KB
Loading

css-fonts-4/images/pwid.png

5.63 KB
Loading
15.9 KB
Loading

css-fonts-4/images/trad.png

4.02 KB
Loading

0 commit comments

Comments
 (0)