---
layout: post
title: "How to use a custom font in R with showtext and google fonts (CC262)"
blurb: "Using showtext with google fonts"
author: "PD Schloss"
date: 2022-11-03 11:00
comments: false
youtube: BLCzG5k35xw
start_hash: 27aabc4cd5535350794278203018b681e88456b4
end_hash: c2295b25ca51cfea5f0902688e48de2cd708fc8f
---

The best way to make your R visuals stand out from all the rest is to use a custom font. This can easily be done using the showtext R package with google fonts. Pat will show you how you can customize your fonts for the different text elements of your figure and webpage. The overall goal of this project is to highlight reproducible research practices using a number of tools. The specific output from this project will be a map-based visual that shows the level of drought across the globe. The website we generate in this episode can be found at https://www.riffomonas.org/drought_index.

<iframe style="margin: 0 auto;display:block;" width="560" height="315" src="https://www.youtube.com/embed/{{ page.youtube }}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

## Code

You can browse the state of the repository at the

* [beginning of the episode](https://github.com/riffomonas/drought_index/tree/{{page.start_hash}})
* [end of the episode](https://github.com/riffomonas/drought_index/tree/{{page.end_hash}})
