TLatex characters wrong in SaveAs PDF

Hi everybody,

I have a TH2D histogram with an axis label containing “#Delta” in a TCanvas. Running CINT, this is being displayed correctly. However, when I use TCanvas::SaveAs to create a PDF, something goes wrong with the font and #Delta turns to Ø. This does not happen when formulas are being typeset with PDFLaTeX on the same machine, which leads me to believe it’s a problem with ROOT. Can anybody help?

Edit: The #circ symbol turns into a Greek Upsilon, turn.

Which ROOT version are you using ? on which machine ?
I do not see this problem. For me both #Delta and #circ are correct in a PDF file.
Can you provide a 3 lines example using TLatex and showing this issue ?

I’m using ROOT 5.34/10 on Ubuntu 10.04 LTS.
Example below. (Not three lines, I hope that’s no issue.)

TH1D* h = new TH1D("h","hist Delta #Delta circ #circ",100,-5,5); h->GetXaxis()->SetTitle("mu #mu"); h->GetYaxis()->SetTitle("nu #nu"); TCanvas c("c","c",400,300); h->Draw(); c.SaveAs("TLatex_test.pdf");

You can find the PDF in the attachments.
TLatex_test.pdf (13.8 KB)

It must be a problem with your PDF previewer. See how my renders your file. It is fine.

I have exactly the same problem. Yes, it’s a pdf viewer issue, but it only affects pdf generated from root. Was any solution found eventually? Thanks.

Can you post a working pdf not produced by ROOT and a not working one produced by ROOT ?
Which previewer are you using ?
Can you post a macro producing a wrong PDF ?

Late to the party, but I can reproduce this with ROOT v6.22/06 (and evince 3.38.2 for what it’s worth). My workaround is to save as eps then call epstopdf.

test_tlatex.pdf (13.0 KB) test_tlatex.C (490 Bytes)

The PDF (on the left) looks fine compare to the screen output (on the right)

( I am using Preview on Mac as viewer)

Is it maybe an issue of a missing font in the pdf?

As I said earlier it is more a problem of “viewer”. When pdf is concerned the reference viewer is Adobe Acrobat. I opened this file with Acrobat and I get a correct output (the same I get with Mac Preview).