Google Fonts の使い方
-
Google Fonts にアクセスし、お好みのフォントを選択します。
-
フォントページで
Get fontボタンを見つけてクリックします。

Get embed codeをクリックします。

@importを選択します。

- ここでは、2 つの部分の内容をコピーする必要があります。

第一部分
たとえば、私が選択したこのフォントでは、Google が提供する埋め込みコードは次のようになっています。
<style>
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:[email protected]&display=swap');
</style>
URL 内の ? 以降の部分だけをコピーし(上図の赤線部分)、プラグイン設定ページの Google Fonts (Font families) 欄に貼り付けます。この例では、family=Noto+Sans+JP:[email protected]&display=swap をコピーすれば十分です。
第二部分
このフォントでは、Google が提供するスタイルコードは次のようになっています。
// <uniquifier>: Use a unique and descriptive class name
// <weight>: Use a value from 100 to 900
.noto-sans-jp-<uniquifier> {
font-family: "Noto Sans JP", sans-serif;
font-optical-sizing: auto;
font-weight: <weight>;
font-style: normal;
}