> 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/it/articoli-approfonditi/40-step-4-how-to-configure-an-italic-variable-font-using-fontspec.md).

# Passo 4: Come configurare un font variabile corsivo usando fontspec

[Introduzione](https://www.overleaf.com/learn/latex/Articles/How_to_use_OpenType_variable_fonts_with_LaTeX?preview=true) [Passo 1](https://www.overleaf.com/learn/latex/Articles/Step_1:_Setting_up_an_Overleaf_project_to_use_variable_fonts?preview=true) [Passo 2](https://www.overleaf.com/learn/latex/Articles/Step_2:_An_introduction_to_LaTeX_fonts?preview=true) [Passo 3](https://www.overleaf.com/learn/latex/Articles/Step_3:_Replacing_LaTeX’s_default_fonts_with_variable_fonts?preview=true) [Passo 4](https://www.overleaf.com/learn/latex/Articles/Step_4:_How_to_configure_an_italic_variable_font_using_fontspec?preview=true) [Passo 5](https://www.overleaf.com/learn/latex/Articles/Step_5:_LaTeX_font_weights_and_named_instances_of_variable_fonts?preview=true) [Passo 6](https://www.overleaf.com/learn/latex/Articles/Step_6:_Using_variable_fonts_to_add_bold_fonts_to_an_Overleaf_project?preview=true) [Passo 7](https://www.overleaf.com/learn/latex/Articles/Step_7:_Using_Noto_Sans_and_Roboto_Mono_variable_fonts_with_LaTeX?preview=true) [Passo 8](https://www.overleaf.com/learn/latex/Articles/Step_8:_How_to_create_a_simple_LaTeX_package_to_configure_your_variable_fonts?preview=true) [Esempi e progetti](https://www.overleaf.com/learn/latex/Articles/Overleaf_projects_showing_how_to_use_variable_fonts_with_LaTeX?preview=true)

In questo passo, configureremo un font variabile corsivo per risolvere uno dei tre avvisi di “forma non definita”.

## Riepilogo degli avvisi di “forma non definita” del nostro progetto

LaTeX al momento avvisa che tre forme di font mancano dal nostro progetto:

![Immagine che mostra gli avvisi di mancanza dei font in LaTeX.](/files/57c0cf6256d4489e994bf08331b6cb5bba26b1e6)

Sono riassunti nella tabella qui sotto, ma ricorda che m viene omessa dall'identificatore della serie *eccetto* dove *entrambi* la larghezza e il peso sono m (medio). In questo articolo mostreremo come risolvere il secondo avviso aggiungendo un font con peso medio, larghezza media e nella forma corsiva.

| **Numero dell'avviso** | **Descrizione dell'avviso**                                                         | **Identificatore della serie** | **Peso** | **Larghezza** | **Forma** |
| ---------------------- | ----------------------------------------------------------------------------------- | ------------------------------ | -------- | ------------- | --------- |
| 1                      | **b**vecchio peso, **m**font a larghezza media nella **n**forma normale (verticale) | b                              | b        | m             | n         |
| 2                      | **m**peso medio, **m**font a larghezza media nella **it**forma corsiva              | m                              | m        | m             | it        |
| 3                      | **b**vecchio peso, **m**font a larghezza media nella **it**forma corsiva            | b                              | b        | m             | it        |

## Due file di font per Noto Serif

Il design degli stili di font verticale e corsivo (caratteri tipografici) è spesso troppo diverso per consentire una transizione fluida tra di essi tramite un asse di design in un font variabile. Le forme verticale e corsiva richiedono ciascuna un file di font dedicato per preservare le caratteristiche uniche del loro design. Di conseguenza, il progetto tutorial di Overleaf contiene i seguenti file per Noto Serif:

* per la forma verticale: `NotoSerif-VariableFont-wdth-wght.ttf`
* per la forma corsiva: `NotoSerif-Italic-VariableFont-wdth-wght.ttf`

## Come aggiungere il font corsivo Noto Serif

Il font principale del testo del documento, Noto Serif, è configurato usando il `\setmainfont` di TeX:

```
\setmainfont{NotoSerif-VariableFont-wdth-wght.ttf}
```

Come promemoria, `\setmainfont` ha la forma generale

```
\setmainfont{⟨font⟩}[⟨font features⟩]
```

Possiamo usare l'opzionale `⟨font features⟩` per abilitare una forma corsiva per il font principale del documento usando la `ItalicFont` chiave.

### Configurazione di un font variabile corsivo

Usa i seguenti passaggi per attivare (configurare) il font variabile corsivo Noto Serif.

1. Assicurati di aprire il progetto del tutorial configurato nel Passo 3.
2. Sostituisci questa riga

```
\setmainfont{NotoSerif-VariableFont-wdth-wght.ttf}
```

con la seguente

```
\setmainfont{NotoSerif-VariableFont-wdth-wght.ttf}
[
ItalicFont=NotoSerif-Italic-VariableFont-wdth-wght.ttf
]
```

6. Ricompila e nota i seguenti punti.

* Ci sono due avvisi di forma non definita, uno in meno rispetto a prima:

![Immagine che mostra gli avvisi di mancanza dei font in LaTeX.](/files/e95689f5c873f720cff9e97b8d5cefb6d095984e)

Questi avvisi sono causati dalla mancanza di font in grassetto per le forme di font normale (n) e corsivo (it).

* Il seguente avviso non appare più:

``Forma di font `TU/NotoSerif-VariableFont-wdth-wght.ttf(0)/m/it' non definita``

* Il testo corsivo è riapparso nel documento impaginato perché ora LaTeX ha accesso a un font corsivo a peso medio, larghezza media (serie) nella `NotoSerif-VariableFont-wdth-wght.ttf(0)` famiglia.

## Nel passaggio successivo

Nel Passo 5 impariamo i pesi dei font variabili, preparandoci per il Passo 6 in cui completeremo la configurazione iniziale dei nostri font variabili.


---

# 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/it/articoli-approfonditi/40-step-4-how-to-configure-an-italic-variable-font-using-fontspec.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.
