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
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.
0 Response to graph export, as(pdf) fails to add special characters in the graph legend if inside {fontface "...": ...}
Post a Comment