> 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/29-how-to-use-opentype-variable-fonts-with-latex.md).

# LaTeXでOpenType可変フォントを使う方法

[はじめに](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)

このチュートリアルシリーズでは、LaTeX で OpenType 可変フォントをインストール、設定、使用する方法を学びます。LuaLaTeX と [fontspec パッケージ](https://ctan.org/pkg/fontspec?lang=en)。ガイド付きの [Overleaf プロジェクト](https://www.overleaf.com/8438931911svtqtnmfvsrp#28008d)を通して、実践的なテクニックと必須の基礎知識の両方を網羅した手順を段階的にたどり、LaTeX 文書で可変フォントを自信を持って扱えるようにします。その過程で、適切な可変フォントを設定して「未定義のフォント形状」警告を解消する方法を含め、LaTeX のフォントに関する理解をより広げていきます。

可変フォントは、ウェイトや幅などのフォント属性をカスタマイズできるため、テキストの見た目と読みやすさを向上させ、LaTeX 文書のデザインに比類のない柔軟性をもたらします。また、限られたスペースにより多くのテキストを収めるといった組版上の問題の解決にも役立ちます。このシリーズはテキストフォントのみに焦点を当てている点にご注意ください。数式組版用の可変フォントはまだ利用できないためです。

### チュートリアルの内容

* 可変フォント入門（この記事）
* [ステップ 1: 可変フォントを使うための Overleaf プロジェクトの準備](/latex/ja/xiang-xi-ji-shi/37-step-1-setting-up-an-overleaf-project-to-use-variable-fonts.md)
* [ステップ 2: LaTeX フォント入門](/latex/ja/xiang-xi-ji-shi/38-step-2-an-introduction-to-latex-fonts.md)
* [ステップ 3: LaTeX の既定フォントを可変フォントに置き換える](/latex/ja/xiang-xi-ji-shi/39-step-3-replacing-latex-s-default-fonts-with-variable-fonts.md)
* [ステップ 4: fontspec を使ってイタリックの可変フォントを設定する方法](/latex/ja/xiang-xi-ji-shi/40-step-4-how-to-configure-an-italic-variable-font-using-fontspec.md)
* [ステップ 5: LaTeX のフォントウェイトと可変フォントの名前付きインスタンス](/latex/ja/xiang-xi-ji-shi/41-step-5-latex-font-weights-and-named-instances-of-variable-fonts.md)
* [ステップ 6: 可変フォントを使って Overleaf プロジェクトに太字フォントを追加する](/latex/ja/xiang-xi-ji-shi/42-step-6-using-variable-fonts-to-add-bold-fonts-to-an-overleaf-project.md)
* [ステップ 7: LaTeX で Noto Sans と Roboto Mono の可変フォントを使う](/latex/ja/xiang-xi-ji-shi/43-step-7-using-noto-sans-and-roboto-mono-variable-fonts-with-latex.md)
* [ステップ 8: 可変フォントを設定するための簡単な LaTeX パッケージを作成する方法](/latex/ja/xiang-xi-ji-shi/44-step-8-how-to-create-a-simple-latex-package-to-configure-your-variable-fonts.md)
* [LaTeX で可変フォントを使う方法を示す 5 つの Overleaf プロジェクト](/latex/ja/xiang-xi-ji-shi/35-overleaf-projects-showing-how-to-use-variable-fonts-with-latex.md)

### 可変フォント入門

タイポグラファー、デザイナー、フォント愛好家にとって、2016年9月14日は記憶に残る日です。その日、Microsoft、 [Google](https://opensource.googleblog.com/2016/09/introducing-opentype-font-variations.html), [Adobe](https://blog.typekit.com/2016/09/14/variable-fonts-a-new-kind-of-font-for-flexible-design/)、そして Apple [正式に発表しました](https://youtu.be/6kizDePhcFU?feature=shared\&t=250) という新しいフォント形式を [OpenType フォントバリエーション](https://medium.com/variable-fonts/https-medium-com-tiro-introducing-opentype-variable-fonts-12ba6cd2369)、より一般的には *OpenType 可変フォント* 、または単に *可変フォント*.

従来は、regular、bold、semi-bold、extra bold、condensed、bold-condensed など、各フォントスタイルごとに個別のフォントファイルが必要でしたが、もはやその必要はありません。OpenType 可変フォントは、デザイン軸として知られる組み込みパラメータの値を調整することで、1 つのフォントファイルから複数のフォントスタイルを生成できる印象的な技術です。 *デザイン軸*。これは、以下の動画で Google の [Noto Serif 可変フォント](https://fonts.google.com/noto/specimen/Noto+Serif/tester).

{% embed url="<https://videos.ctfassets.net/nrgyaltdicpt/3OhDBHA95DciCRVRgrF4wp/18f8c3f6d15109bf307c48bde9d7c879/VariableFonts.mp4>" %}

Google の Noto Serif には幅とウェイトという 2 つのデザイン軸がありますが、他のフォントには 1 つの軸しかない場合もあれば、複数の軸がある場合もあります。たとえば、「Recursive」という可変フォントには 5 つの軸があり、 [Recursive](https://fonts.google.com/specimen/Recursive/tester) には 5 つの軸があり、 [さらに多いものもあります](https://www.axis-praxis.org/specimens/decovar)。フォントの開発者が、軸の数とそのデザイン効果を決定します。

### デザイン軸に関するいくつかの注意点

LaTeX（具体的には fontspec と LuaLaTeX）で可変フォントを使うために、デザイン軸について知っておくべきことは次のとおりです。

* 各デザイン軸は、短い4文字の「タグ」と、より長く説明的な名前で識別されます。
* OpenType 可変フォント仕様では、 [5 つの登録済み（「標準」）軸](https://learn.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg#registered-axis-tags):

|      |       |
| ---- | ----- |
| タグ   | 名前    |
| ital | イタリック |
| opsz | 光学サイズ |
| slnt | 傾き    |
| wdth | 幅     |
| wght | ウェイト  |

* 〜から [バージョン 2.9a](https://github.com/latex3/fontspec/releases/tag/v2.9a)で述べたように、 [fontspec パッケージ](https://ctan.org/pkg/fontspec?lang=en) は、たとえば次のように、その名前を使って標準軸の値を設定できます。 `Weight=400`.
* フォントの制作者は、追加のデザイン軸を自由に作成し、名前を付けることができます。fontspec は、4 文字のタグを使って任意のデザイン軸の値を設定する機能を提供します。
* デザイン軸の値は、フォントの作成者が決める刻み幅で、最小値から最大値までの範囲を取ります。LaTeX（LuaLaTeX）で可変フォントを使うには、その軸と、それぞれの最小値、最大値、増分（刻み幅）の値を知っておく必要があります。
* 現在、可変フォントは文書の本文テキストにのみ使用できます。可変数式フォントはありません。
* Google は [デザイン軸の一覧](https://fonts.google.com/variablefonts#axis-definitions) を管理しており、そこには4文字のデザインタグ、完全な名称、そしてその軸が何をするかの説明が含まれています。

### 可変フォントには LuaLaTeX と fontspec パッケージが必要です

2024年8月時点では、LuaLaTeX [コンパイラ](/latex/ja/narejjibsu/026-changing-compiler.md) のみが OpenType 可変フォントをサポートしています。pdfLaTeX と XeLaTeX は対応していません。

LuaLaTeX で OpenType フォントを使うには fontspec パッケージが必要です。fontspec は、より低レベルで技術的なフォント読み込みシステムである [luaotfload](https://ctan.org/pkg/luaotfload?lang=en)にアクセスするためのユーザーレベルのコマンドを提供します。luaotfload の機能を直接使うことも十分可能ですが、ほとんどの人は fontspec の手軽さと便利さを好みます。

[TeX Live 2024](https://www.overleaf.com/blog/tex-live-2024-is-now-available) には、2024年2月13日にリリースされた fontspec バージョン 2.9a が含まれており、可変フォントの使用をさらに簡単にする追加機能が加わっています。

### 可変フォントはどこで見つけて試せますか？

Google Fonts を訪れるのは、始めるのに最適な場所です。特に [フォントファミリーとそのデザイン軸を一覧表示したページ](https://fonts.google.com/variablefonts)です。興味のあるフォントを見つけたら、その *Type tester* ページに移動し、用意されたコントロールでデザイン軸を調整してください。

その [Axis-Praxis のウェブサイト](https://www.axis-praxis.org) では、多数の可変フォントを試すことができ、その中には興味深いデザインの可能性を示すものもあります。 [Decovar](https://www.axis-praxis.org/specimens/decovar)。これは12個のデザイン軸を持つ実験的なフォントです。また、可変フォントを Axis-Praxis にアップロードし、プラットフォームが自動生成するコントロールを使ってデザイン軸の値を変えながらテストすることもできます。

もう1つ役立つサイトは <https://v-fonts.com/>で、その目的を「可変フォントを見つけて試すためのシンプルなリソース」と説明しています。

[はじめに](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)


---

# 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/29-how-to-use-opentype-variable-fonts-with-latex.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.
