font-family

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2016.

font-family は CSS の記述子で、 @font-face アットルールで指定されたフォントのフォントファミリーを指定することができます。

この値は、 font-family プロパティを用いて要素をスタイル設定する際に、特定の @font-face に対して名前を照合するために用いられます。 任意の名前を使用することができ、これは基盤のフォントデータで指定された名前を上書きします。

構文

css
/* <string> 値 */
font-family: "font family";
font-family: "another font family";

/* <custom-ident> 値 */
font-family: example-font;

<family-name>

フォントファミリーの名前を指定します。

公式定義

関連するアット規則@font-face
初期値n/a (required)
計算値指定通り

形式文法

font-family = 
<family-name>

<family-name> =
<string> |
<custom-ident>+

フォントファミリー名の設定

css
@font-face {
  font-family: "Some font family";
  src: url("some_font_name.ttf");
}

仕様書

Specification
CSS Fonts Module Level 4
# font-family-desc

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
font-family

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報