Using Unicode Character βπ β (U+1F81D) in the ggplot xaxis title #9591
-
DescriptionHello, I am trying to use Unicode Character βπ β (U+1F81D) in one of the figure's x axis title. When I run the R chunk in qmd, it returns me the correct character. The ggplot just uses lab(x = "Pr(outcome) π "). However, when I render the whole HTML, the π is not recognized. Is there something I should set in YAML? I also tried the HTML entity shown here https://www.compart.com/en/unicode/U+1F81D, but it is still not rendering correctly. Thank you very much. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You need to use a graphic device and have the font that can use that unicode. For instance, I can't even see that unicode on MacOS but I can see it on Windows. ---
title: "Quarto Playground"
format: html
knitr:
opts_chunk:
dev: ragg_png
---
This is a playground for Quarto.
```{r}
library(ggplot2)
ggplot() + geom_blank() + labs(title = "Hello, Quarto \u03a9")
``` |
Beta Was this translation helpful? Give feedback.
It's a matter of font being used.
You need to use a font that has those unicode you want.
Unfortunately, this is unrelated to Quarto, thus out of Quarto support scope.