> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/ja/xiang-xi-ji-shi/41-step-5-latex-font-weights-and-named-instances-of-variable-fonts.md).

# ステップ 5: LaTeX のフォントウェイトと可変フォントの名前付きインスタンス

[はじめに](https://www.overleaf.com/learn/latex/Articles/How_to_use_OpenType_variable_fonts_with_LaTeX?preview=true) [ステップ 1](https://www.overleaf.com/learn/latex/Articles/Step_1:_Setting_up_an_Overleaf_project_to_use_variable_fonts?preview=true) [ステップ 2](https://www.overleaf.com/learn/latex/Articles/Step_2:_An_introduction_to_LaTeX_fonts?preview=true) [ステップ 3](https://www.overleaf.com/learn/latex/Articles/Step_3:_Replacing_LaTeX’s_default_fonts_with_variable_fonts?preview=true) [ステップ 4](https://www.overleaf.com/learn/latex/Articles/Step_4:_How_to_configure_an_italic_variable_font_using_fontspec?preview=true) [ステップ 5](https://www.overleaf.com/learn/latex/Articles/Step_5:_LaTeX_font_weights_and_named_instances_of_variable_fonts?preview=true) [ステップ 6](https://www.overleaf.com/learn/latex/Articles/Step_6:_Using_variable_fonts_to_add_bold_fonts_to_an_Overleaf_project?preview=true) [ステップ 7](https://www.overleaf.com/learn/latex/Articles/Step_7:_Using_Noto_Sans_and_Roboto_Mono_variable_fonts_with_LaTeX?preview=true) [ステップ 8](https://www.overleaf.com/learn/latex/Articles/Step_8:_How_to_create_a_simple_LaTeX_package_to_configure_your_variable_fonts?preview=true) [例とプロジェクト](https://www.overleaf.com/learn/latex/Articles/Overleaf_projects_showing_how_to_use_variable_fonts_with_LaTeX?preview=true)

このステップでは、中間ウェイトを出発点として、可変フォントのウェイトに値を設定する 2 つの方法を示します。可変フォントの名前付きインスタンスを紹介し、それらが LaTeX の標準フォントウェイトとどのように対応するかを見ていきます。

ステップ 4 で構成したチュートリアルプロジェクトを必ず開いてください。

## デザイン軸の値を設定する 2 つの方法

Google のタイプテスターページでは、スライダーまたは名前と値のドロップダウンリストの 2 つの方法で可変フォントのデザイン軸の値を設定できます。 [Noto Serif のテスターページ](https://fonts.google.com/noto/specimen/Noto+Serif/tester) では、100 から 900 までのウェイト軸スライダーと、さまざまなフォントウェイトを表す名前付きインスタンスの一覧が提供されています。

![スライダーまたは名前付きインスタンスを使用してデザイン軸の値を設定する 2 つの方法を示す画像](/files/6f306e50ceb07d67f90f41d2a25e4cd568d34042)

### 可変フォントの「インスタンス」とは何ですか？

1 つの *インスタンス* 可変フォントのインスタンスとは、複数あり得るスタイルのバリエーションの 1 つを作成するために使われる、軸の値の特定の組み合わせです。軸の値の組み合わせに名前を付けると、名前付きインスタンスが定義されます。名前付きインスタンスのデータは可変フォントファイル内に保存されます。

## LaTeX のフォントウェイトの名称

ステップ 2 で述べたように、LaTeX では 9 つの標準フォントウェイトが定義されており、それぞれに短い識別子と、より長い説明的な名前があります:

|                    |                  |
| ------------------ | ---------------- |
| **LaTeX のウェイト識別子** | **LaTeX のウェイト名** |
| ul                 | ウルトラライト          |
| el                 | エクストラライト         |
| l                  | ライト              |
| sl                 | セミライト            |
| m                  | ミディアム（標準）        |
| sb                 | セミボールド           |
| b                  | ボールド             |
| eb                 | エクストラボールド        |
| ub                 | ウルトラボールド         |

Noto Serif のウェイト軸の値は 100 から 900 まであり、100 刻みで 9 つの名前付きインスタンス値を便利に提供します。各名前付きインスタンスは、次の表に要約されているように、LaTeX の 9 つの標準ウェイトのいずれかに対応付けることができます。

|                 |                       |         |           |
| --------------- | --------------------- | ------- | --------- |
| **LaTeX のウェイト** | **可変フォントの名前付きインスタンス** |         |           |
| *LaTeX の識別子*    | *名前*                  | *ウェイト値* | *インスタンス名* |
| ul              | ウルトラライト               | 100     | 細字        |
| el              | エクストラライト              | 200     | エクストラライト  |
| l               | ライト                   | 300     | ライト       |
| sl              | セミライト                 | 400     | レギュラー     |
| m               | ミディアム（レギュラー）          | 500     | ミディアム     |
| sb              | セミボールド                | 600     | セミボールド    |
| b               | ボールド                  | 700     | ボールド      |
| eb              | エクストラボールド             | 800     | エクストラボールド |
| ub              | ウルトラボールド              | 900     | ブラック      |

## LaTeX の「ミディアム」（レギュラー）ウェイトの値を選択する

LaTeX では、「ミディアム」と「レギュラー」のウェイトは同じ意味です。これは、文書本文の大部分に使われるフォントウェイトを指します。これに対して Noto Serif の名前付きインスタンスでは、Regular ウェイトは 400、Medium ウェイトは 500 です。LaTeX のミディアムウェイトにどの値を割り当てるかは私たち次第です。ひとまず 400 を試しますが、うまくいかなければ（見た目がよくなければ）、別の値に簡単に切り替えられます。タイポグラフィの制御こそが、可変フォントの利点です。

### ミディアムウェイトの可変フォントの値を設定する

太字フォントを追加する前に、プロジェクトで使っている Noto Serif フォントの LaTeX のミディアム（レギュラー）ウェイトの値を設定しておく必要があります。

fontspec では、ウェイト軸の値を設定するための 2 つの機能が提供されています:

* Weight = ⟨value⟩ で、ウェイト軸をサポートされている任意の ⟨value⟩ に設定します
* Instance = ⟨named instance⟩ で、⟨named instance⟩ の設定で定義されたウェイトに設定します

### ミディアムウェイトを 400 に設定する

ミディアムウェイトを 400 に設定するには、現在のプロジェクトの \setmainfont コマンドを次のように編集します

```
\setmainfont{NotoSerif-VariableFont-wdth-wght.ttf}[
Weight=400,
% または、Weight=400 を次のものに置き換えることもできます
% Instance=Regular,
ItalicFont=NotoSerif-Italic-VariableFont-wdth-wght.ttf
]
```

イタリックフォントもウェイト軸の値が 400 になります。

文書を再コンパイルした後、組版結果が気に入らなければ、次のことを試せます:

* Weight 軸の別の値を使う
* 次の \fontsize コマンドを使って、フォントサイズと行間を試してみる `\fontsize` コマンド; たとえば、次のように書いてみてください

```
\fontsize{9}{11}\selectfont
```

の直後に `\begin{document}`

## 次のステップで

次のステップでは、可変フォントを構成して、太字および太字イタリックのフォントを提供します。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/ja/xiang-xi-ji-shi/41-step-5-latex-font-weights-and-named-instances-of-variable-fonts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
