Skip to content

Commit e78590e

Browse files
committed
[css-fonts-4] Merge font-variant-ligatures from CSS Fonts 3 #1653
1 parent 996aab6 commit e78590e

1 file changed

Lines changed: 105 additions & 0 deletions

File tree

css-fonts-4/Overview.bs

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3532,6 +3532,111 @@ on text rendering speed.</p>
35323532
<h3 id="font-variant-ligatures-prop">
35333533
Ligatures: the 'font-variant-ligatures' property</h3>
35343534

3535+
3536+
3537+
<pre class="propdef">
3538+
Name: font-variant-ligatures
3539+
3540+
Value: <span title="normal!!font-variant-ligatures">normal</span> | <span title="none!!font-variant-ligatures">none</span> | [ <var>&lt;common-lig-values&gt;</var> || <var>&lt;discretionary-lig-values&gt;</var> || <var>&lt;historical-lig-values&gt;</var> || <var>&lt;contextual-alt-values&gt;</var> ]
3541+
Initial: normal
3542+
Applies to: all elements
3543+
Inherited: yes
3544+
Percentages: n/a
3545+
Computed value: as specified
3546+
Animation type: discrete
3547+
</pre>
3548+
3549+
<p>Ligatures and contextual forms
3550+
are ways of combining glyphs
3551+
to produce more harmonized forms.</p>
3552+
3553+
<pre class="prod"><dfn id="common-lig-values"><var>&lt;common-lig-values&gt;</var></dfn> = [ <span>common-ligatures</span> | <span>no-common-ligatures</span> ]</pre>
3554+
3555+
<pre class="prod"><dfn id="discretionary-lig-values"><var>&lt;discretionary-lig-values&gt;</var></dfn> = [ <span>discretionary-ligatures</span> | <span>no-discretionary-ligatures</span> ]</pre>
3556+
3557+
<pre class="prod"><dfn id="historical-lig-values"><var>&lt;historical-lig-values&gt;</var></dfn> = [ <span>historical-ligatures</span> | <span>no-historical-ligatures</span> ]</pre>
3558+
3559+
<pre class="prod"><dfn id="contextual-alt-values"><var>&lt;contextual-alt-values&gt;</var></dfn> = [ <span>contextual</span> | <span>no-contextual</span> ]</pre>
3560+
3561+
<p>Individual values have the following meanings:</p>
3562+
3563+
<dl>
3564+
<dt><dfn id="font-variant-ligatures-normal-value" title="normal!!font-variant-ligatures">normal</dfn></dt>
3565+
<dd>A value of <span title="normal!!font-variant-ligatures">'normal'</span>
3566+
specifies that common default features are enabled,
3567+
<a href="#font-feature-resolution">as described in detail
3568+
in the next section</a>.
3569+
For OpenType fonts,
3570+
common ligatures and contextual forms are on by default,
3571+
discretionary and historical ligatures are not.</dd>
3572+
3573+
<dt><dfn id="font-variant-ligatures-none-value" title="none!!font-variant-ligatures">none</var></dt>
3574+
<dd>Specifies that all types of ligatures and contextual forms
3575+
covered by this property
3576+
are explicitly disabled.
3577+
In situations where ligatures are not considered necessary,
3578+
this <em>may</em>
3579+
improve the speed of text rendering.</dd>
3580+
3581+
<dt><dfn>common-ligatures</dfn>
3582+
<dd>Enables display of common ligatures
3583+
(OpenType features: <span class="tag">liga, clig</span>).
3584+
For OpenType fonts,
3585+
common ligatures are enabled by default.</dd>
3586+
3587+
<div class="featex"><img alt="common ligature example" src="liga.png"></div>
3588+
3589+
<dt><dfn>no-common-ligatures</dfn>
3590+
<dd>Disables display of common ligatures
3591+
(OpenType features: <span class="tag">liga, clig</span>).</dd>
3592+
3593+
<dt><dfn>discretionary-ligatures</dfn>
3594+
<dd>Enables display of discretionary ligatures
3595+
(OpenType feature: <span class="tag">dlig</span>).
3596+
Which ligatures are discretionary or optional is decided by the type designer,
3597+
so authors will need to refer to
3598+
the documentation of a given font
3599+
to understand which ligatures are considered discretionary.</dd>
3600+
3601+
<div class="featex"><img alt="discretionary ligature example" src="dlig.png"></div>
3602+
3603+
<dt><dfn>no-discretionary-ligatures</dfn>
3604+
<dd>Disables display of discretionary ligatures
3605+
(OpenType feature: <span class="tag">dlig</span>).</dd>
3606+
3607+
<dt><dfn>historical-ligatures</dfn>
3608+
<dd>Enables display of historical ligatures
3609+
(OpenType feature: <span class="tag">hlig</span>).</dd>
3610+
3611+
<div class="featex"><img alt="historical ligature example" src="hlig.png"></div>
3612+
3613+
<dt><dfn>no-historical-ligatures</dfn>
3614+
<dd>Disables display of historical ligatures
3615+
(OpenType feature: <span class="tag">hlig</span>).</dd>
3616+
3617+
<dt><dfn>contextual</dfn>
3618+
<dd>Enables display of contextual alternates
3619+
(OpenType feature: <span class="tag">calt</span>).
3620+
Although not strictly a ligature feature,
3621+
like ligatures this feature is commonly used
3622+
to harmonize the shapes of glyphs with the surrounding context.
3623+
For OpenType fonts,
3624+
this feature is on by default.</dd>
3625+
3626+
<div class="featex"><img alt="contextual alternate example" src="calt.png"></div>
3627+
3628+
<dt><dfn>no-contextual</dfn>
3629+
<dd>Disables display of contextual alternates
3630+
(OpenType feature: <span class="tag">calt</span>).</dd>
3631+
3632+
</dl>
3633+
3634+
<p id=rlig-unaffected"><em>Required</em> ligatures,
3635+
needed for correctly rendering complex scripts,
3636+
are not affected by the settings above,
3637+
including 'none'
3638+
(OpenType feature: <span class="tag">rlig</span>).</p>
3639+
35353640
<h3 id="font-variant-position-prop">
35363641
Subscript and superscript forms: the 'font-variant-position' property</h3>
35373642

0 commit comments

Comments
 (0)