Skip to content

Commit 683605e

Browse files
committed
[css-fonts-4] Resolve #2221 on use of font-variation-settings
1 parent c3d9d60 commit 683605e

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

css-fonts-4/Overview.bs

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5367,13 +5367,22 @@ over OpenType or TrueType font variations.
53675367
It is intended as a way of providing access to font variations
53685368
that are not widely used but are needed for a particular use case.
53695369

5370+
The use of font variation settings
5371+
does not affect font selection
5372+
where a fallback font is to be used,
5373+
where using font properties for the same axis
5374+
would have an effect on font selection.
5375+
53705376
When possible,
53715377
authors should generally use the other properties related to font variations
5372-
(such as 'font-optical-sizing')
5373-
whenever possible
5378+
(such as 'font-optical-sizing'),
53745379
and only use this property for special cases
53755380
where its use is the only way of accessing a particular infrequently used font variation.
53765381

5382+
For example,
5383+
it is preferable to use 'font-weight!!property': 700
5384+
rather than 'font-variation-settings': wght 700.
5385+
53775386
A value of ''font-variation-settings/normal'' means that no change in glyph shape, matching, or positioning occurs due to this property.
53785387

53795388
The <<string>> is a case-sensitive OpenType or TrueType variation axis name.
@@ -5387,13 +5396,14 @@ so they are not limited to explicitly registered OpenType / TrueType variation a
53875396
Fonts defining custom axis names
53885397
should follow the <a href="https://www.microsoft.com/typography/otspec/fvar.htm">name rules</a> defined in the OpenType specification.
53895398

5390-
Axis values not present in the font
5391-
are ignored and therefore have no effect;
5399+
If a given axis is not supported by a font,
5400+
its value setting is ignored and therefore has no effect;
53925401
a user agent must not attempt to synthesize fallback behavior based on these axis tags.
53935402
Other axis values within the same CSS 'font-variation-settings' statement are not ignored.
53945403

5395-
Axis values greater or less than the range supported by the font
5396-
are clamped to the closest value supported by the font.
5404+
If a variation axis is supported by a font
5405+
but its set value is greater or less than the predefined font range,
5406+
it will be clamped to the closest value supported by the font.
53975407

53985408
Values are allowed to be fractional or negative.
53995409

0 commit comments

Comments
 (0)