Hello,
I recently upgrade my system to fedora 39 and greek letters in TLatex such as “#sigma” is printed as “s”.
Is there a problem with some font packages?
(I am using root-v6-28-08 from official fedora 39 packages).
Thanks for your answer,
Olivier
Maybe @couet can help with this
It is strange because the fonts are coming with ROOT in $ROOTSYS/fonts
. So it should be system independant.
You tried something like that ?
auto t = new TLatex(.5,.5,"#sigma");
t->Draw()
?
Hello,
Thank you for your answer. Here is the png of the TCanvas…with the “s” in the middle…and not a sigma
Here is what I get:
% root -n
------------------------------------------------------------------
| Welcome to ROOT 6.29/01 https://root.cern |
| (c) 1995-2022, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for macosx64 on Jun 06 2023, 11:09:28 |
| From heads/master@v6-29-01-1517-g72f9994e00 |
| With Apple clang version 14.0.0 (clang-1400.0.29.202) |
| Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------------
root [0] auto t = new TLatex(.5,.5,"#sigma");
root [1] t->Draw()
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [2] gPad->Print("sigma.png")
Info in <TCanvas::Print>: file sigma.png has been created
root [3] .q
Do you have the fonts
folder in $ROOTSYS
?
Hello,
Thank you for your help.
No ROOTSYS is set to / (I installed root using dnf fedora package) ; the font dir is in /usr/share/root/fonts
What is strange the same installation on fedora 38 (ROOTSYS=/ too, font dir is at the same place with the same files) every thing works as it should…
Any idea?
Cheers
Olivier
So, where to you pick root
from ? what do you get when you type which root
?
Regarding the fonts
folder, you should get:
% ls $ROOTSYS/fonts
BlackChancery.ttf FreeSansOblique.otf STIXGeneralItalic.otf STIXSiz5Sym.otf courbd.ttf symbol.ttf verdana.ttf
DroidSansFallback.ttf FreeSerif.otf STIXSiz1Sym.otf arial.ttf courbi.ttf times.ttf verdanab.ttf
FreeMono.otf FreeSerifBold.otf STIXSiz1SymBol.otf arialbd.ttf couri.ttf timesbd.ttf verdanai.ttf
FreeMonoBold.otf FreeSerifBoldItalic.otf STIXSiz2Sym.otf arialbi.ttf georgia.ttf timesbi.ttf verdanaz.ttf
FreeMonoBoldOblique.otf FreeSerifItalic.otf STIXSiz2SymBol.otf ariali.ttf georgiab.ttf timesi.ttf webdings.ttf
FreeMonoOblique.otf LICENSE STIXSiz3Sym.otf ariblk.ttf georgiai.ttf trebuc.ttf wingding.ttf
FreeSans.otf STIXGeneral.otf STIXSiz3SymBol.otf comic.ttf georgiaz.ttf trebucbd.ttf
FreeSansBold.otf STIXGeneralBol.otf STIXSiz4Sym.otf comicbd.ttf impact.ttf trebucbi.ttf
FreeSansBoldOblique.otf STIXGeneralBolIta.otf STIXSiz4SymBol.otf cour.ttf monotype.ttf trebucit.ttf
Hello
root is in /bin/root and the font dir which is not $ROOTSYS/fonts but /usr/share/root/fonts contains:
STIXGeneralBolIta.otf STIXGeneralItalic.otf STIXSiz1SymBol.otf STIXSiz2SymBol.otf STIXSiz3SymBol.otf STIXSiz4SymBol.otf STIXSiz5Sym.otf
STIXGeneralBol.otf STIXGeneral.otf STIXSiz1Sym.otf STIXSiz2Sym.otf STIXSiz3Sym.otf STIXSiz4Sym.otf
Again, on fedora 38, these values (ROOTSYS, fonts dir contain, …) is the same as on Fedora 39 but in the older version, #sigma gives a real sigma greek letter.
can you try:
root [0] TROOT::GetTTFFontDir()
to see what is the font dir ?
root [0] TROOT::GetTTFFontDir()
(const TString &) “/usr/share/root/fonts”[21]
Ok so it is pointing to the right place.
But in /usr/share/root/fonts
it does not seem you have symbol.ttf
?
I try to copy it from an other directory, thus now I have this file…but it doesn’t change anything (but on Fedora38 this file was not there and it works)…
I do not have access to a fedora 39 machine. I cannot try myself. It is realy weird. I never saw that. You do not get any error message ?
Have you tried to install ROOT from sources ? that might be an other option …
$ git clone https://github.com/root-project/root.git root
$ mkdir build
$ cd build
$ cmake ../root
$ make -j8
$ source bin/thisroot.sh
$ root
- I have no error/warning printed with the “official” root from fedora 39 package
- the compilation from source works !!! I will leave with that for now
Thank you very much!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.