Dieser Inhalt wurde automatisch aus dem Englischen übersetzt, und kann Fehler enthalten. Erfahre mehr über dieses Experiment.

View in English Always switch to English

font-synthesis-small-caps

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨März 2023⁩.

Die font-synthesis-small-caps CSS Eigenschaft ermöglicht es Ihnen, festzulegen, ob der Browser einen Small-Caps-Schriftgrad synthetisieren darf, wenn dieser in einer Schriftfamilie fehlt. Small-Caps-Glyphen verwenden typischerweise die Form von Großbuchstaben, sind jedoch auf die Größe von Kleinbuchstaben reduziert.

Es ist oft praktisch, die Kurzschreibweiseigenschaft font-synthesis zu verwenden, um alle Schriftgrad-Synthesewerte zu steuern.

Syntax

css
/* Keyword values */ font-synthesis-small-caps: auto; font-synthesis-small-caps: none; /* Global values */ font-synthesis-small-caps: inherit; font-synthesis-small-caps: initial; font-synthesis-small-caps: revert; font-synthesis-small-caps: revert-layer; font-synthesis-small-caps: unset; 

Werte

auto

Gibt an, dass der fehlende Small-Caps-Schriftgrad bei Bedarf vom Browser synthetisiert werden darf.

none

Gibt an, dass die Synthese des fehlenden Small-Caps-Schriftgrads durch den Browser nicht erlaubt ist.

Formale Definition

Anfangswertauto
Anwendbar aufall elements and text. Auch anwendbar auf ::first-letter und ::first-line.
VererbtJa
Berechneter Wertwie angegeben
Animationstypdiskret

Formale Syntax

font-synthesis-small-caps = 
auto |
none

Beispiele

Deaktivieren der Synthese von Small-Caps-Schriftgrad

Dieses Beispiel zeigt, wie die Synthese des Small-Caps-Schriftgrads durch den Browser bei der Schrift Montserrat deaktiviert wird.

HTML

html
<p class="english"> These are the default <span class="small-caps">small-caps</span>, <strong>bold</strong>, and <em>oblique</em> typefaces. </p> <p class="english no-syn"> The <span class="small-caps">small-caps</span> typeface is turned off here but not the <strong>bold</strong> and <em>oblique</em> typefaces. </p> 

CSS

css
@import "https://fonts.googleapis.com/css2?family=Montserrat&display=swap"; .english { font-family: "Montserrat", sans-serif; } .small-caps { font-variant: small-caps; } .no-syn { font-synthesis-small-caps: none; } 

Ergebnis

Spezifikationen

Specification
CSS Fonts Module Level 4
# font-synthesis-small-caps

Browser-Kompatibilität

Siehe auch