Dear all,
I have problems with fonts since I have installed the version 5.28/00 of Root.
I am joining some files to show you the problem.
As a test, a used the macro available on the page : root.cern.ch/root/v528/Version528.news.html
I cannot attach the “symbolitalic.svg” file, but you can see the problem. The file Screenshot.png is showing all the files, plus the model I am supposed to see (at the center). On the .pdf and .ps files, the font is bigger than expected, and there is overlap between letters. On the .gif files, the font is in italic, small and greek letters are not taken into account. I tried to change fonts in my rootlogon.C file, but nothing has changed. Do you know where does it come from? Sorry if the problem is not related to Root, but all has changed when I have upgraded the root version.
I do not see the problem with the SVN trunk on linux. I get the attached files.
I will try with 5.28. symbolitalic.ps (3.58 KB) symbolitalic.pdf (12.1 KB)
What do you have against Ubuntu?
I tried this code myself yesterday, too.
All the graphical output is fine on an Ubuntu 10.04.2 LTS, i686, gcc 4.4.3 with ROOT 5.28/00b (svn revision 38685).
I have no idea what the cause of this problem can be, sorry.
I have nothing against ubuntu but if you look closely the to screen dump E_Pierre posted it really looks like an unbutu system. So, good to know you have no problems on unbutu. Thanks
thanks to look at my problem.
Yes, I am using Ubuntu 10.04.
To see if the problem comes from my version of Root, I returned to the former version I have on my computer using set_root_version (5.26/00d)
I ran the same small script with both versions (5.26/00d and 5.28/00). Files produced are attached. As you can see, with my 5.28/00, the font is different. What can I do to solve this problem? Sorry, I am a beginner in root…
Yes I have a rootlogon.C file.
When I start Root with the -n option, it does not change anything, I obtained the same (I did the test with the symbolitalic files) .
The only thing that comes to my mind is that … it is possible that the machine is missing some “magic” font.
When ROOT tries to figure out where to put characters in a ps/pdf output, it probably uses some kind of a “font metric” (to estimate the length of the first “Symbol:” text, for example) and when the “magic” font is missing, it uses incorrect values (“default”?, coming from another font that it actually uses?).
BTW. I did not really test the “.svg” output - the standard “display” command doesn’t display Greek letters at all (it displays a single “?” character in this place). When viewed by “Mozilla Firefox 3.6.16”, it displays the “alpha” only (no “beta”, nor “chi”).
[...] > diff symbolitalic.good.ps symbolitalic.bad.ps
3,4c3,4
< %%Creator: ROOT Version 5.28/00b
< %%CreationDate: Fri Apr 1 12:26:21 2011
---
> %%Creator: ROOT Version 5.28/00
> %%CreationDate: Thu Mar 31 20:43:32 2011
46,50c46,50
< gsave 0 0 t black[ ] 0 sd 3 lw 0.95 0.95 0.95 c 2948 536 0 0 bf 1 1 1 c 0 0 m 8 8 d 520 Y 2932 X 8 8 d -2948 X -536 Y f 0.665 0.665 0.665 c 0 0 m 8 8 d 2932 X 520 Y 8 8 d -536 Y -2948 X f black
< gsave 2948 536 0 0 C 2486.47 245.669 t 0 r /Symbol findfont 178.669 sf 0 0 m ita (abc) show gr NC gr
< gsave 2948 536 0 0 C 1183.68 245.669 t 0 r /Helvetica-Bold findfont 178.669 sf 0 0 m ( \255 Symbol Italic ) show NC gr
< gsave 2948 536 0 0 C 878.454 245.669 t 0 r /Symbol findfont 178.669 sf 0 0 m (abc) show NC gr
< gsave 2948 536 0 0 C 141.446 245.669 t 0 r /Helvetica-Bold findfont 178.669 sf 0 0 m (Symbol: ) show NC gr gr showpage
---
> gsave 0 0 t black[ ] 0 sd 3 lw 0.999 0.999 0.999 c 2948 536 0 0 bf black
> gsave 2948 536 0 0 C 1302.81 245.688 t 0 r /Symbol findfont 178.669 sf 0 0 m ita (abc) show gr NC gr
> gsave 2948 536 0 0 C 588.125 245.688 t 0 r /Helvetica-Bold findfont 178.669 sf 0 0 m ( \255 Symbol Italic ) show NC gr
> gsave 2948 536 0 0 C 454.125 245.688 t 0 r /Symbol findfont 178.669 sf 0 0 m (abc) show NC gr
> gsave 2948 536 0 0 C 141.438 245.688 t 0 r /Helvetica-Bold findfont 178.669 sf 0 0 m (Symbol: ) show NC gr gr showpage
The PS output relies on the TTF fonts to place the characters. The diff between your PS file and a good one clearly shows that the X position of the character is not good in your case. As ROOT is the same, the faulty part can only be the fonts on your machines. That’s confirmed by the fact the old version you show looks ugly too: it is not the expected fonts. Have you installed ROOT from the sources or are you using a pre-compiled module ? Are the fonts correctly installed on your machine ?
are you using the fonts in $ROOTSYS/fonts ?
Something just came to my mind.
Ubuntu provides ROOT 5.18 binary packages. These packages install "/etc/root/" configuration files (or maybe it was “/etc/system.rootrc”, I don’t remember now). Maybe you have them there and they contain “improper” entries for fonts (i.e. pointing to the non-installed on your system Ubuntu ROOT 5.18 related font packages).
Try these two commands:
ls /etc|grep -i root
ls /etc/.|grep -i root
(Note: the latter command will find one “root” … this is the “/etc/…/root”, however, i.e. “/root”, don’t bother; any other found entry should be inspected.)
I don’t really know how this version was installed, I did not installed it by myself (it was done by the IT service of my lab). I assume fonts are well installed on my machine (I never observed any problem), and it seems I am using the good fonts (It is what it is written in my .rootrc:
In this case I would ask them to uninstall all Ubuntu ROOT 5.18 related packages at all.
Sooner or later you will face another problems related to these configuration files, as your own ROOT will parse them (and it will try to reference files/features they point to).
Start the “System” -> “Administration” -> “Synaptic Package Manager”, in the “Quick search” field type two words “cern root”, select all found packages (that are installed) and “mark” them all for the “complete removal” (accepting all additional required changes, if required), click the “Apply” button.
There is something I don’t understand now.
What happens if you remove your private “.rootrc” file at all?
Do you then get proper ROOT behavior or not?
If yes, then there is no problem with the “/etc/root/*” configuration files (and you just have improper entries in your private “.rootrc” file).
If not, then there is a problem in ROOT - it unconditionally reads “system wide” configuration files, which may belong to a completely different version.