I just updated my R to version 4.2. Ggtext
, which was working fine until then now erase white spaces between words if the text is bold. I found a very similar question on RStudio forum but not a solution for me.
A reproducible example would be as follows (although maybe not that reproducible in other R versions, for it did work fine for me until this morning).
library(ggplot2)
library(ggtext)
p <- ggplot() +
geom_blank() +
labs(title = "A title with some words") +
theme(plot.title = element_textbox_simple(
face = "bold"))
p
And without bold
:
library(ggplot2)
library(ggtext)
p <- ggplot() +
geom_blank() +
labs(title = "A title with some words") +
theme(plot.title = element_textbox_simple())
p
You can just use
**bold text**
to get your text bold:Output: