Movatterモバイル変換


[0]ホーム

URL:


  1. 開発者向けのウェブ技術
  2. CSS
  3. リファレンス
  4. プロパティ
  5. font-kerning

このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docsコミュニティーについてもっと知り、仲間になるにはこちらから。

View in EnglishAlways switch to English

font-kerning

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2020年1月.

font-kerningCSS のプロパティで、フォントに存在するカーニング情報の使用を制御します。

試してみましょう

font-kerning: auto;
font-kerning: normal;
font-kerning: none;
<section>  <div>    “We took Tracy to see ‘THE WATERFALL’ in W. Virginia.”  </div></section>
section {  font-family: serif;}

「カーニング」は、文字同士の間隔に作用します。適切にカーニングされたフォントでは、この機能により特定の文字組み合わせ間の空白が縮小され、文字間隔がより均一で読みやすいものになります。

例えば、下の画像では、左の例ではカーニングが使われていませんが、右の例ではカーニングが使われています。

font-kerning の例

構文

css
font-kerning: auto;font-kerning: normal;font-kerning: none;/* グローバル値 */font-kerning: inherit;font-kerning: initial;font-kerning: revert;font-kerning: revert-layer;font-kerning: unset;

auto

このキーワードは、カーニングを使用するかをブラウザーに任せます。フォントサイズが小さい場合はカーニングが不自然になることがあるため、ブラウザーは無効化するでしょう。これは既定値です。

normal

このキーワードは、カーニングを適用するよう要求します。

none

このキーワードは、ブラウザーがフォントのカーニング情報を使用しないようにします。

公式定義

初期値auto
適用対象すべての要素とテキスト。::first-letterおよび::first-line にも適用されます。
継承あり
計算値指定通り
アニメーションの種類離散値

形式定義

font-kerning =
auto|
normal|
none
この構文はCSS Fonts Module Level 4 による最新の標準を反映しています。すべてのブラウザーがすべての部分を実装しているわけではありません。サポート情報についてはブラウザーの互換性を参照してください。

カーニングの有無

HTML

html
<div></div><div></div><textarea>AV T. ij</textarea>

CSS

css
div {  font-size: 2rem;  font-family: "Times New Roman";}#no-kern {  font-kerning: none;}#kern {  font-kerning: normal;}

JavaScript

js
const input = document.getElementById("input");const kern = document.getElementById("kern");const noKern = document.getElementById("no-kern");input.addEventListener("keyup", () => {  kern.textContent = input.value; /* コンテンツを更新 */  noKern.textContent = input.value;});kern.textContent = input.value; /* コンテンツを初期化 */noKern.textContent = input.value;

仕様書

Specification
CSS Fonts Module Level 4
# font-kerning-prop

ブラウザーの互換性

関連情報

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp