Hi, I am trying to export a plot where I include special characters in the legend while I also set the font face. The created graph looks excellent in the graph window, as well as in the exported PNG. However, the PDF export fails to expand special characters using the {&...} notation. The following code replicates the issue:
Code:
sysuse auto

*this is okay in both pdf and png
tw (sc mpg price if !foreign) (sc mpg price if foreign), leg(lab(1 `"{&Delta} Not Foreign"') label(2 `"{&Gamma} Foreign"'))
gr export "C:/appl/stata_data/mpg_price.pdf", as(pdf) replace
gr export "C:/appl/stata_data/mpg_price.png", as(png) replace

*issue is here only in pdf
tw (sc mpg price if !foreign) (sc mpg price if foreign), leg(lab(1 `"{fontface "Times New Roman":{&Delta} Not Foreign}"') label(2 `"{fontface "Bauhaus 93":{&Gamma} Foreign}"'))
gr export "C:/appl/stata_data/mpg_price_fontface.pdf", as(pdf) replace
gr export "C:/appl/stata_data/mpg_price_fontface.png", as(png) replace
I have attached the exported figures. Does anyone know how to export to PDF correctly?
PS: Uploading the PDF with the font face setting failed with the error message: `Ghostscript must be installed on the server to resize .pdf files. mpg_price_fontface.pdf.' This may also be related to the above issue, though I am not sure.