Skip to content

Commit 11e9a85

Browse files
author
Peter Linss
committed
merge
2 parents f2e2c96 + b04c94a commit 11e9a85

File tree

2 files changed

+132
-71
lines changed

2 files changed

+132
-71
lines changed

css-fonts-4/Overview.bs

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -553,11 +553,12 @@ Values have the following meanings:
553553

554554
<dt><dfn>italic</dfn>
555555
<dd>
556-
Matches against a font that is labeled as an oblique face, or an italic face if one is not.
556+
Matches against a font that is labeled as an italic face, or an oblique face if one is not.
557557

558558
<dt><dfn>oblique <<angle>>?</dfn>
559559
<dd>
560-
Controls matching against an oblique face. The lack of a number represents an angle of "20deg". Values less than -90deg or values greater than 90deg are invalid and are treated as parse errors. (Note that a font might internally provide its own mapping for "oblique", but that mapping within the font is disregarded)
560+
Controls matching against an oblique face. The lack of a number represents an angle of "20deg". Values less than -90deg or values greater than 90deg are invalid and are treated as parse errors. (Note that a font might internally provide its own mapping for "oblique", but that mapping within the font is disregarded).
561+
Matches against a font that is labeled as an oblique face, or an italic face if one is not.
561562
</dl>
562563

563564
Some font families might contain only zero or one italic or oblique face, while yet other
@@ -2013,8 +2014,8 @@ non-conformant behavior. Authors are advised to use fallback fonts in
20132014
their font lists that closely match the metrics of the
20142015
downloadable fonts to avoid large page reflows where possible.
20152016

2016-
<a id="same-origin-restriction">
2017-
<a id="allowing-cross-origin-font-loading">
2017+
<a id="same-origin-restriction"> </a>
2018+
<a id="allowing-cross-origin-font-loading"> </a>
20182019
<h4 id="font-fetching-requirements">Font fetching requirements</h4>
20192020

20202021
For font loads, user agents must use the
@@ -2679,8 +2680,8 @@ required for specific scripts, or recommended as enabled by default or
26792680
they might be stylistic features meant to be used under author
26802681
control.
26812682

2682-
For a good visual overview of these features, see the
2683-
[[OPENTYPE-FONT-GUIDE]]. For a detailed description of glyph processing for
2683+
For a good visual overview of these features, see
2684+
the [[OPENTYPE-FONT-GUIDE]]. For a detailed description of glyph processing for
26842685
OpenType fonts, see [[WINDOWS-GLYPH-PROC]].
26852686

26862687
Stylistic font features can be classified into two broad
@@ -2725,6 +2726,53 @@ Numerical formatting: the 'font-variant-numeric' property</h3>
27252726
<h3 id="font-variant-alternates-prop">
27262727
Alternates and swashes: the 'font-variant-alternates' property</h3>
27272728

2729+
<pre class="propdef">
2730+
Name: font-variant-alternates
2731+
Value: normal | [ <<stylistic>> || <<historical-forms>> || <<styleset>> || <<character-variant>> || <<swash>> || <<ornaments>> || <<annotation>> ]
2732+
Initial: normal
2733+
Applies to: all elements
2734+
Inherited: yes
2735+
Percentages: n/a
2736+
Computed value: as specified
2737+
Media: visual
2738+
Animatable: no
2739+
</pre>
2740+
2741+
For any given character, fonts can provide a variety of alternate
2742+
glyphs in addition to the default glyph for that character. This
2743+
property provides control over the selection of these alternate
2744+
glyphs.
2745+
2746+
For many of the property values listed below, several different
2747+
alternate glyphs are available. How many alternates are available
2748+
and what they represent is font-specific, so these are each marked
2749+
<dfn>font specific</dfn> in the value definitions below. Because the nature
2750+
of these alternates is font-specific, the
2751+
''@font-feature-values'' rule is used to define values for a
2752+
specific font family or set of families that associate a font-specific
2753+
numeric <feature-index> with a custom
2754+
<feature-value-name>, which is then used in this
2755+
property to select specific alternates:
2756+
2757+
<pre>@font-feature-values Noble Script { @swash { swishy: 1; flowing: 2; } }
2758+
2759+
p {
2760+
font-family: Noble Script;
2761+
font-variant-alternates: swash(flowing); /* use swash alternate #2 */
2762+
}</pre>
2763+
2764+
When a particular <feature-value-name> has not
2765+
been defined for a given family or for a particular feature type, the
2766+
computed value must be the same as if it had been defined. However,
2767+
property values that contain these undefined <feature-value-name>
2768+
identifiers must be ignored when choosing glyphs.
2769+
2770+
<pre>/* these two style rules are effectively the same */
2771+
2772+
p { font-variant-alternates: swash(unknown-value); } /* not a defined value, ignored */
2773+
p { font-variant-alternates: normal; }
2774+
</pre>
2775+
27282776
Issue: Moved to Level 4; port the text for this from Fonts 3 .src to Fonts 4 .bs
27292777

27302778
<h3 id="font-feature-values">
@@ -3275,6 +3323,7 @@ Font family: the 'font-family' descriptor</h3>
32753323
Name: font-family
32763324
Value: <<'font-family'>>
32773325
For: @font-palette-values
3326+
Initial: N/A
32783327
</pre>
32793328

32803329
This descriptor defines the font family name that this palette applies to.
@@ -3293,6 +3342,7 @@ Specifying the base palette: the 'base-palette' descriptor</h3>
32933342
Name: base-palette
32943343
Value: <<integer>>
32953344
For: @font-palette-values
3345+
Initial: N/A
32963346
</pre>
32973347

32983348
This descriptor specifies a palette in the font
@@ -3331,6 +3381,7 @@ Overriding a color in the palette: The <<integer>> descriptor</h3>
33313381
Name: <<integer>>
33323382
Value: <<color>>
33333383
For: @font-palette-values
3384+
Initial: N/A
33343385
</pre>
33353386

33363387
This descriptor overrides or adds a color

0 commit comments

Comments
 (0)