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
Copy file name to clipboardExpand all lines: css-fonts-4/Overview.bs
+94-73Lines changed: 94 additions & 73 deletions
Original file line number
Diff line number
Diff line change
@@ -601,86 +601,107 @@ Font width: the 'font-stretch!!property' property</h3>
601
601
<h3 id="font-style-prop">
602
602
Font style: the 'font-style!!property' property</h3>
603
603
604
-
<pre class="propdef">
605
-
Name: font-style
606
-
Value: normal | italic | oblique <<angle>>?
607
-
Initial: normal
608
-
Applies to: all elements
609
-
Inherited: yes
610
-
Percentages: n/a
611
-
Computed value: As specified
612
-
Media: visual
613
-
Animatable: If both "from" and "to" values are "oblique", then yes, as an <<angle>>. Otherwise, no.
614
-
</pre>
604
+
<pre class="propdef">
605
+
Name: font-style
606
+
Value: normal | italic | oblique <<angle>>?
607
+
Initial: normal
608
+
Applies to: all elements
609
+
Inherited: yes
610
+
Percentages: n/a
611
+
Computed value: As specified
612
+
Media: visual
613
+
Animatable: If both "from" and "to" values are "oblique", then yes, as an <<angle>>. Otherwise, no.
614
+
</pre>
615
615
616
-
The 'font-style!!property' property allows
617
-
italic or oblique faces to be selected. Italic forms are generally cursive in nature while oblique faces are
618
-
typically sloped versions of the regular face. Oblique faces can be simulated by artificially sloping the
619
-
glyphs of the regular face. Compare the artificially sloped renderings of Palatino "a" and Baskerville "N"
620
-
in grey with the actual italic versions:
616
+
The 'font-style!!property' property allows italic or oblique faces to be selected.
617
+
Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face.
621
618
622
-
<figure>
623
-
<img alt="artificial sloping vs. real italics" src="images/realvsfakeitalics.png" >
624
-
<figcaption>Artificial sloping versus real italics</figcaption>
625
-
</figure>
619
+
<div class="example">
620
+
Compare the artificially sloped renderings of Palatino "a" and Baskerville "N" in grey
621
+
with the actual italic versions:
626
622
627
-
Values have the following meanings:
623
+
<figure>
624
+
<img alt="artificial sloping vs. real italics" src="images/realvsfakeitalics.png" >
625
+
<figcaption>Artificial sloping versus real italics</figcaption>
626
+
</figure>
627
+
</div>
628
628
629
-
<dl dfn-for=font-style dfn-type=value>
630
-
<dt><dfn>normal</dfn>
631
-
<dd>
632
-
Matches against a face that is classified as a normal face, one that is neither italic or obliqued. This represents an oblique value of "0".
629
+
Values have the following meanings:
633
630
634
-
<dt><dfn>italic</dfn>
635
-
<dd>
636
-
Matches against a font that is labeled as an italic face, or an oblique face if one is not.
631
+
<dl dfn-for=font-style dfn-type=value>
632
+
<dt><dfn>normal</dfn>
633
+
<dd>
634
+
Matches against a face that is classified as a normal face,
635
+
one that is neither italic or obliqued.
636
+
This represents an oblique value of "0".
637
637
638
-
<dt><dfn>oblique <<angle>>?</dfn>
639
-
<dd>
640
-
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).
641
-
Matches against a font that is labeled as an oblique face, or an italic face if one is not.
642
-
</dl>
638
+
<dt><dfn>italic</dfn>
639
+
<dd>
640
+
Matches against a font that is labeled as an italic face,
641
+
or an oblique face if one does not exist.
643
642
644
-
Some font families might contain only zero or one italic or oblique face, while yet other
645
-
families might contain multiple oblique faces with varying
646
-
angles. The font matching routine will select a font to use which
647
-
is closest to the requested angle. In general, for a requested angle greater
648
-
or equal to 20deg, larger angles are prefered; otherwise, smaller
649
-
angles are preferred (see the
650
-
<a href="#font-matching-algorithm">font matching section below</a> for
651
-
the precise algorithm). Fractional and negative values are accepted, but values
652
-
less than -90 as well as values greater than 90 are not
653
-
allowed and are treated as parse errors.
654
-
For TrueType / OpenType fonts which use variations, the "slnt"
655
-
variation is used to implement oblique values, and the "ital" variation with a value of "1"
656
-
is used to implement the italic values. The meaning of a
657
-
negative value for "oblique" is to slope the text in the opposite
658
-
direction.
659
-
660
-
If no italic or oblique face is available, oblique faces can be
661
-
synthesized by rendering non-obliqued faces with an artificial
662
-
obliquing operation. The use of these artificially obliqued faces
663
-
can be disabled using the 'font-synthesis' property. The details
664
-
of the obliquing operation are not explicitly defined.
665
-
666
-
For the purposes of font matching, User Agents may treat ''italic'' as a synonym for
667
-
''oblique''. For User Agents which treat these values distinctly, synthesis must not
668
-
be performed for ''italic''. All user agents may perform synthesis for ''oblique''.
669
-
670
-
Note: Authors should also be aware that synthesized
671
-
approaches might not be suitable for scripts like Cyrillic, where italic
672
-
forms are very different in shape. It is always better to use an actual
673
-
italic font rather than rely on a synthetic version.
674
-
675
-
<!-- resolution on the "undefined" nature of synthetics: https://www.w3.org/2013/06/06-css-minutes.html#item03 -->
676
-
677
-
Many scripts lack the tradition of mixing a cursive form within
678
-
text rendered with a normal face. Chinese, Japanese and Korean fonts
679
-
almost always lack italic or oblique faces. Fonts that support a
680
-
mixture of scripts will sometimes omit specific scripts such as Arabic
681
-
from the set of glyphs supported in the italic face. User agents
682
-
should be careful about making <a>character map</a> assumptions across
683
-
faces when implementing support for <em>installed font fallback</em>.
643
+
<dt><dfn>oblique <<angle>>?</dfn>
644
+
<dd>
645
+
Controls matching against an oblique face.
646
+
Positive angles represent a clockwise slant;
647
+
negative angles represent a counter-clockwise slant.
648
+
The lack of an <<angle>> represents ''20deg''.
649
+
(Note that a font might internally provide its own mapping for "oblique",
650
+
but the mapping within the font is disregarded.)
651
+
Fractional and negative values are accepted; however,
652
+
values less than -90deg or values greater than 90deg are <a>invalid</a>.
653
+
If no oblique faces exist, this value can match an italic face.
654
+
</dl>
655
+
656
+
A font family might contain no italic or oblique faces,
657
+
only an italic face and no oblique,
658
+
only an oblique face and no italic,
659
+
both an oblique and an italic,
660
+
multiple oblique faces at various angles,
661
+
or various combinations thereof.
662
+
The font matching routine will select a font to use which is closest to the requested angle.
663
+
In general, for a requested angle greater or equal to 20deg,
664
+
larger angles are prefered;
665
+
otherwise, smaller angles are preferred.
666
+
(See [[#font-matching-algorithm]].)
667
+
For TrueType / OpenType fonts that use variations,
668
+
the <code>slnt</code> variation is used to implement oblique values,
669
+
and the <code>ital</code> variation with a value of 1 is used to implement the italic values.
670
+
671
+
Issue: What direction should positive and negative obliques skew in vertical writing mode?
672
+
How do we achieve skews in the opposite dimension
673
+
(needed for vertical writing)?
674
+
675
+
If no italic or oblique face is available,
676
+
oblique faces may be synthesized by rendering non-obliqued faces
677
+
with an artificial obliquing operation.
678
+
The use of these artificially obliqued faces
679
+
can be disabled using the 'font-synthesis' property.
680
+
681
+
<!-- resolution on the "undefined" nature of synthetics: https://www.w3.org/2013/06/06-css-minutes.html#item03 -->
682
+
683
+
Note: While oblique faces can be simulated by artificially sloping the glyphs of the regular face,
684
+
this is not equivalent to a true oblique,
685
+
in which optical stroke thicknesses are properly preserved despite the slant.
686
+
It is always better to use an actual oblique font rather than rely on a synthetic version.
687
+
688
+
For the purposes of font matching,
689
+
User Agents may treat ''italic'' as a synonym for ''oblique''.
690
+
For User Agents that treat these values distinctly,
691
+
synthesis must not be performed for ''italic''.
692
+
693
+
Note: Authors should also be aware that synthesized approaches might not be suitable
694
+
for scripts like Cyrillic, where italic forms are very different in shape.
695
+
It is always better to use an actual italic font rather than rely on a synthetic version.
696
+
697
+
Note: Many scripts lack the tradition of mixing a cursive form within text rendered with a normal face.
698
+
Chinese, Japanese and Korean fonts almost always lack italic or oblique faces.
699
+
Fonts that support a mixture of scripts
700
+
will sometimes omit specific scripts, such as Arabic,
701
+
from the set of glyphs supported in the italic face.
702
+
User agents should be careful about making <a>character map</a> assumptions across faces
703
+
when implementing synthesis across fonts,
704
+
as italic faces in a family can have different <a>character maps</a> than Roman faces.
0 commit comments