> 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/ko/in-depth-articles/39-step-3-replacing-latex-s-default-fonts-with-variable-fonts.md).

# 3단계: 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)

이 단계에서는 LaTeX의 기본 글꼴을 가변 글꼴로 바꾸는 데 사용할 fontspec 패키지의 세 가지 명령을 소개합니다.

## fontspec을 사용해 LaTeX의 기본 글꼴을 변경하기

다음 fontspec 패키지 명령을 사용해 LaTeX의 기본 글꼴을 원하는 가변 글꼴로 바꿀 것입니다:

* `\setmainfont{⟨font⟩}[⟨font features⟩]` 본문에 사용되는 글꼴을 설정합니다.
* `\setsansfont{⟨font⟩}[⟨font features⟩]` 산세리프 글꼴을 설정합니다.
* `\setmonofont{⟨font⟩}[⟨font features⟩]` 고정폭 글꼴을 설정합니다.

이 명령들은 각각 두 부분으로 이루어져 있습니다:

* `⟨font⟩`: 중괄호로 묶인 필수 인수 `{...}`, 사용할 글꼴을 지정하며, 글꼴 이름이나 글꼴 파일 이름으로 주어집니다.
* `⟨font features⟩`: 대괄호로 묶인 선택적 인수 `[...]`, 가변 글꼴 설정을 포함한 글꼴별 기능을 활성화하는 데 사용됩니다.

이 명령들은 튜토리얼의 나중 단계에서 더 자세히 설명합니다.

## 튜토리얼 프로젝트의 가변 글꼴을 활성화하는 방법

프로젝트의 가변 글꼴을 활성화하고 사용하려면 다음 단계를 따르세요.

1. 초기 튜토리얼 프로젝트를 열고 다음 코드를 문서 서문에 붙여 넣어 업데이트하세요—다음 줄 뒤에 붙여 넣습니다 `\usepackage{fontspec}`.

```latex
% 문서 패밀리 본문 글꼴
\setmainfont{NotoSerif-VariableFont-wdth-wght.ttf}
% 문서 패밀리 산세리프 글꼴
\setsansfont{NotoSans-VariableFont-wdth-wght.ttf}
% 문서 패밀리 고정폭 글꼴
\setmonofont{RobotoMono-VariableFont-wght.ttf}
```

![문서 서문에서 LaTeX 코드를 붙여 넣을 위치를 보여주는 이미지](/files/ca02321e217c458531ee93fd889bfcbf7be2b928)

4. 업데이트된 프로젝트를 다시 컴파일하여 가변 글꼴로 조판하세요. 다음 문제를 확인할 수 있습니다:

* 조판된 문서에는 더 이상 굵은 글꼴이나 이탤릭 글꼴이 없습니다.
* “정의되지 않은 글꼴 형태” 경고가 세 개 있습니다:

![LaTeX의 글꼴 누락 경고를 보여주는 이미지](/files/f5643cce852619ebb3e67feaf2ef1d9cf3717363)

## 왜 “정의되지 않은 형태” 경고가 보이나요?

가변 글꼴에 대한 초기 설정은 *매우* 기본적으로 직립형의 중간 굵기 글꼴만 활성화합니다. 그 결과 LaTeX는 “정의되지 않은 형태” 경고를 표시하여, 문서에서 사용한 굵은 글꼴, 굵은 이탤릭 글꼴, 일반 이탤릭 글꼴을 조판할 수 있는 글꼴에 더 이상 접근할 수 없음을 알립니다.

## LaTeX의 “정의되지 않은 형태” 경고 이해하기

2단계에서 설명했듯이, LaTeX는 각 텍스트 글꼴을 인코딩, 패밀리, 시리즈, 형태, 크기라는 다섯 가지 속성에 따라 분류합니다. 인코딩, 패밀리, 시리즈, 형태의 조합이 알려진 “실제” 글꼴에 해당하지 않는 글꼴을 사용하려고 하면, LaTeX는 “누락된 형태” 경고를 표시합니다. 이러한 경고는 필요한 속성으로 글꼴을 설정하면 방지할 수 있습니다.

### 이 경고들의 구조

각 경고는 다음과 같은 구조를 가집니다

``글꼴 형태 `*인코딩/패밀리 이름/시리즈/형태*'가 정의되지 않음``

이 그림에서 보듯이:

![LaTeX의 누락된 형태 경고 구조를 보여주는 이미지](/files/f129f91243ebdac8c0a70cb55fc4305b8bec9f24)

### 이 경고들은 무엇을 알려주나요?

다음 각 경고는 아래에서 설명합니다.

![LaTeX의 글꼴 누락 경고를 보여주는 이미지](/files/f5643cce852619ebb3e67feaf2ef1d9cf3717363)

1. **``글꼴 형태 `TU/NotoSerif-VariableFont-wdth-wght.ttf(0)/b/n'가 정의되지 않음``**

LaTeX는 다음 속성 조합을 가진 글꼴에 접근할 수 없습니다:

* *인코딩*: **`TU`** (유니코드).
* *패밀리*: `**NotoSerif-VariableFont-wdth-wght.ttf(0)**`—\setmainfont 명령을 사용할 때 fontspec 패키지가 만든 긴 패밀리 이름입니다. 패밀리 이름은 시리즈 후반부에서 다룹니다.
* *시리즈*: **`b`** → **b**볼드 *무게*, **m**미디엄 *너비* (그 **m** 생략됩니다).
* 형태: **`n`** → **n**노멀(직립형) *형태.*

LaTeX에는 **b**볼드 굵기, **m**미디엄 폭(시리즈), 그리고 **n**노멀(직립형) 형태 글꼴이 있는 `NotoSerif-VariableFont-wdth-wght.ttf(0)` 패밀리입니다.

4. **``글꼴 형태 `TU/NotoSerif-VariableFont-wdth-wght.ttf(0)/b/it'가 정의되지 않음``**

LaTeX는 다음 속성 조합을 가진 글꼴에 접근할 수 없습니다:

* *인코딩*: **`TU`** (유니코드).
* *패밀리*: `**NotoSerif-VariableFont-wdth-wght.ttf(0)**`*.*
* *시리즈*: `**b**` → **b**볼드 굵기, **m**미디엄 폭(즉 **m** 생략됩니다).
* *형태*: it → 이탤릭 형태.

LaTeX에는 **b**볼드 굵기, **m**미디엄 폭(시리즈) **it**이탤릭(형태) 글꼴이 있는 `NotoSerif-VariableFont-wdth-wght.ttf(0)` 패밀리입니다.

8. ``**글꼴 형태 `TU/NotoSerif-VariableFont-wdth-wght.ttf(0)/m/it'가 정의되지 않음**``

LaTeX는 다음 매개변수 조합을 가진 글꼴에 접근할 수 없습니다:

* 인코딩: TU(유니코드)
* 패밀리: NotoSerif-VariableFont-wdth-wght.ttf(0)
* 시리즈: m → 중간 굵기, 중간 폭(단일 m 사용에 주의)
* 형태: it → 이탤릭 형태

LaTeX에는 NotoSerif-VariableFont-wdth-wght.ttf(0) 패밀리에서 중간 굵기, 중간 폭(시리즈)의 이탤릭(형태) 글꼴이 없습니다.

## 다음 단계에서

4단계에서 6단계에서는 가변 글꼴을 설정해 부족한 글꼴 형태를 제공함으로써 이 경고를 해결할 것입니다.

[소개](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/ko/in-depth-articles/39-step-3-replacing-latex-s-default-fonts-with-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.
