Can someone help me solve the Windows font database problem as described below?
Operating system: Windows 11 Pro.
Quarto: version 1.3.450
R version: R-4.3.1
RStudio IDE: 2023.09.01 Build 494
In a quarto document (.qmd file) , when I run a R chunk with ggplot code the correct assigned base_family font, e.g. Comic Sans MS, is shown in the plot.
When I render the quarto document from within RStudio IDE a font warning is shown (see below), and the font is incorrect:
Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family
not found in Windows font database
My Quarto-R code:
author: Miguel Eersel
format:
html:
toc: true
library(tidyverse)
library(palmerpenguins)
penguins <- palmerpenguins::penguins |>
filter(!is.na(sex))
penguins |>
ggplot(aes(species, bill_length_mm, fill = sex)) +
geom_point(
size = 3,
alpha = 0.75,
shape = 21,
col = 'black',
position = position_jitterdodge(seed = 34543)
) +
theme_minimal(base_size = 16, base_family = "Comic Sans MS") +
labs(
x = element_blank(),
y = element_blank(),
subtitle = 'Bill Length',
fill = 'Sex',
title = 'Chinstrap Penguins have the Strongest Difference\nin Bill Lengths Between Genders',
) +
scale_fill_discrete(labels = \(x) str_to_title(x))