I have an issue with my labels using **ggtext**, if I use combining characters like ĚŠČŘŽ or ÖÜÄ, element_markdown() will add additional spaces/render whitespace behind my text. My code looks like this:
library(ggplot2)
library(tidyverse)
library(ggtext)
df_x <- c(runif(6, min = 1, max = 2))
df_y <- c(rep("A", 3), rep("B", 3))
df_lab <- c("Čžěčh Přóblém", "Gërmän pröbëm töö", as.character(1:4))
tibble(df_x, df_y, df_lab) %>%
ggplot(aes(x = df_x, y = df_y, fill = df_lab)) +
geom_bar(position = "stack", stat = "identity") +
theme(legend.text = element_markdown())
I believe this to be a very basic issue, but could not find anything on how to handle this problem.