> 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/nl/diepgaande-artikelen/37-step-1-setting-up-an-overleaf-project-to-use-variable-fonts.md).

# Stap 1: Een Overleaf-project instellen om variabele lettertypen te gebruiken

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

Om met deze tutorial te beginnen, open het [bijbehorende Overleaf-project](https://www.overleaf.com/8438931911svtqtnmfvsrp#28008d) dat de volgende variabele lettertypen bevat:

* [Noto Serif](https://fonts.google.com/noto/specimen/Noto+Serif/tester) (hoofdtekst van het document)
* [Noto Sans](https://fonts.google.com/noto/specimen/Noto+Sans/tester) (sans-serif lettertype)
* [Roboto Mono](https://fonts.google.com/specimen/Roboto+Mono/tester) (lettertype met vaste breedte)

Deze lettertypen zijn nog niet geconfigureerd voor gebruik. Aanvankelijk, wanneer u het [bijbehorende Overleaf-project](https://www.overleaf.com/8438931911svtqtnmfvsrp#28008d), worden de standaard (default) tekstlettertypen van LaTeX toegepast. Tijdens deze tutorial leert u hoe u deze standaardlettertypen vervangt door de variabele lettertypen die worden geleverd in de projectmap met de naam `VariableFonts`.

Als u liever andere variabele lettertypen gebruikt, volg dan gewoon de onderstaande instructies. Anders gaat u verder naar [Stap 2](https://www.overleaf.com/learn/latex/Articles/Step_2:_An_introduction_to_LaTeX_fonts?preview=true) deze tutorial.

## (Optioneel) Hoe u uw eigen variabele lettertypen kiest en uploadt

Volg deze stappen om variabele lettertypen van uw keuze te uploaden.

### 1. Verkrijg variabele lettertypen van Google Fonts

[Google Fonts](https://fonts.google.com/) is een uitstekende bron. Het biedt [nuttige documentatie](https://fonts.google.com/knowledge/introducing_type/introducing_variable_fonts) en veel [gratis te gebruiken variabele lettertypen](https://fonts.google.com/?vfonly=true) die naar Overleaf kunnen worden geüpload en geconfigureerd voor gebruik in uw projecten.

* **TIP**: Gebruik de filters van Google Fonts om variabele lettertypen te vinden. Stel de *Technologie* filter in op *Variabel* om alleen variabele lettertypen weer te geven. Gebruik extra filters, zoals *Serif*, om uw zoekopdracht verder te verfijnen.

![Afbeelding die de zoekfilters van Google Fonts toont](/files/6e3bd7e9c64442af5279596812e4fe003016e48c)

* **TIP**: U kunt variabele lettertypen bekijken op basis van de ontwerpasen die ze ondersteunen: zie <https://fonts.google.com/variablefonts>. Google biedt ook definities van ontwerpasen van variabele lettertypen: zie <https://fonts.google.com/variablefonts#axis-definitions>.
* Nadat u de variabele lettertypen die u wilt gebruiken hebt gevonden, downloadt u ze naar uw lokale apparaat en hernoemt u eventuele bestanden met problematische tekens.
* Sommige variabele lettertypen bestaan uit twee `.ttf` bestanden: één voor de rechte (normale) vorm en, indien aanwezig, één voor de cursieve vorm. Controleer dit voor elk lettertype dat u downloadt.

### 2. Hernoem problematische bestandsnamen van Google-lettertypen

Het naamgevingsschema van Google voor variabele-lettertypebestanden omvat de ontwerpasen van het lettertype, gescheiden door komma's. Helaas veroorzaakt dat schema problemen voor fontspec, een pakket dat essentieel is voor het gebruik van variabele lettertypen met LuaLaTeX. Noto Serif biedt bijvoorbeeld asen voor breedte en gewicht en wordt geleverd als twee bestanden—één voor het rechte lettertype en één voor het cursieve lettertype:

* NotoSerif-VariableFont\_wdth,wght.ttf
* NotoSerif-Italic-VariableFont\_wdth,wght.ttf

De komma's in deze bestandsnamen veroorzaken fouten wanneer ze worden gebruikt in fontspec's `\setmainfont` opdracht. U kunt bijvoorbeeld schrijven

```
\setmainfont{NotoSerif-VariableFont_wdth,wght.ttf}
[ItalicFont = NotoSerif-Italic-VariableFont_wdth,wght.ttf]
```

levert fouten op waaronder

```
! Package fontspec Error: The font "NotoSerif-Italic-VariableFont_wdth" kan niet
(fontspec)                worden gevonden.

! LaTeX-fout: De sleutel 'fontspec-opentype/wght.ttf' is onbekend en wordt
(LaTeX)        genegeerd.
```

Om dit probleem op te lossen, moet u lettertypebestanden hernoemen om komma's (en underscores '\_') te verwijderen en deze te vervangen door een “veilig” teken, zoals koppeltekens ('-'), en ervoor zorgen dat er geen spaties worden toegevoegd. U kunt bijvoorbeeld hernoemen:

* NotoSans-VariableFont\_wdth,wght.ttf

om

* NotoSans-VariableFont-wdth-wght.ttf

Deze eenvoudige hernoeming helpt conflicten te voorkomen en zorgt voor een soepele integratie van variabele lettertypen in uw LaTeX-documenten.

### 3. Maak een nieuw Overleaf-project aan

* Maak een nieuw Overleaf-project aan en [stel de compiler in op LuaLaTeX](/latex/nl/kennisbank/026-changing-compiler.md) omdat dit de enige compiler is die variabele lettertypen ondersteunt.
* Voeg het `fontspec` pakket toe aan de preambule van uw document door te schrijven `\usepackage{fontspec}`.
* Selecteer het pictogram voor bestandsupload (![Image displaying Overleaf file-upload icon](/files/d7408bc46631b2e7e170956ea9c69ac07018b620)) om de lokaal hernoemde variabele-lettertypebestanden aan uw nieuwe project toe te voegen:

![Afbeelding die laat zien hoe u een bestand uploadt naar een Overleaf-project](/files/5f981bc9996520e340d2ac2b0956e234a0a68b20)

### 4. (Optioneel) Organiseer de lettertypebestanden van uw project

Als u wilt experimenteren met een reeks lettertypen, bijvoorbeeld bij het testen van documentontwerpen, is het handig om uw lettertypebestanden te organiseren met projectmappen. Tijdens het compileren zoekt LaTeX echter niet automatisch in uw projectmappen naar lettertypen; u moet LaTeX helpen door een lokaal configuratiebestand te gebruiken met de naam [latexmkrc](/latex/nl/diepgaande-artikelen/28-how-to-use-latexmkrc-with-overleaf.md). We gaan hier niet in detail op in, maar raden aan een projectmap te maken met de naam `VariableFonts` en het te kopiëren `latexmkrc` bestand dat in het [bijbehorende project](https://www.overleaf.com/8438931911svtqtnmfvsrp#28008d).

## In de volgende stap

Stap 2 introduceert LaTeX' model voor het selecteren van lettertypen: het New Font Selection Scheme, en biedt belangrijke achtergrondinformatie die in de rest van deze tutorial wordt gebruikt.

[Inleiding](https://www.overleaf.com/learn/latex/Articles/How_to_use_OpenType_variable_fonts_with_LaTeX?preview=true) [Stap 1](https://www.overleaf.com/learn/latex/Articles/Step_1:_Setting_up_an_Overleaf_project_to_use_variable_fonts?preview=true) [Stap 2](https://www.overleaf.com/learn/latex/Articles/Step_2:_An_introduction_to_LaTeX_fonts?preview=true) [Stap 3](https://www.overleaf.com/learn/latex/Articles/Step_3:_Replacing_LaTeX’s_default_fonts_with_variable_fonts?preview=true) [Stap 4](https://www.overleaf.com/learn/latex/Articles/Step_4:_How_to_configure_an_italic_variable_font_using_fontspec?preview=true) [Stap 5](https://www.overleaf.com/learn/latex/Articles/Step_5:_LaTeX_font_weights_and_named_instances_of_variable_fonts?preview=true) [Stap 6](https://www.overleaf.com/learn/latex/Articles/Step_6:_Using_variable_fonts_to_add_bold_fonts_to_an_Overleaf_project?preview=true) [Stap 7](https://www.overleaf.com/learn/latex/Articles/Step_7:_Using_Noto_Sans_and_Roboto_Mono_variable_fonts_with_LaTeX?preview=true) [Stap 8](https://www.overleaf.com/learn/latex/Articles/Step_8:_How_to_create_a_simple_LaTeX_package_to_configure_your_variable_fonts?preview=true) [Voorbeelden en projecten](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/nl/diepgaande-artikelen/37-step-1-setting-up-an-overleaf-project-to-use-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.
