Hi experts,
Is there a way to create some outlined text in a TCanvas, like in the attached image?
I am using ROOT 6.30, and have looked around TText, TLatex and TPaveText with no luck.
Thanks in advance,
Lida
Hi experts,
Is there a way to create some outlined text in a TCanvas, like in the attached image?
I am using ROOT 6.30, and have looked around TText, TLatex and TPaveText with no luck.
Thanks in advance,
Lida
Hi Lida,
I am not sure we support this kind of fonts. I perhaps let @olivier comment given his deep knowledge of the matter.
Cheers,
D
Some previous discussions:
Yes, we do not have this kind of font.
There is one possible way but it will work only for PostScript files and will required the editing of the PS file. It is the following:
void outlinetext() {
auto c = new TCanvas;
auto t1 = new TText(.5,.5,"Outline text");
t1->Draw();
c->Print("c.ps");
}
open the generated PosScript file (here c.ps
) with your favourite text editor.
after the line:
%%BeginProlog
insert the line:
/oshow {gsave [] 0 setdash true charpath stroke grestore} def
c.ps
you will find something like:... (Outline text) show ...
show
by oshow
and the text will appear as you wish in the Postscript file.Hi all,
Thanks for the suggestion! I will try this PostScript alternative.
Cheers,
Lida
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.