Running ROOT without X font server

Hi All,

I’m having a problem with fonts in Centos 7 with my own build of 6.03/03, an example of which is shown below.


I think the problem is that X font server has been deprecated and is no longer included in the distribution. When I grep for it in the ps list, I only find entries related to the xfs file system. I have been looking to see if I can install the package via yum and have not found it. It seems the preferred method now is to use fontconfig/xft instead of xfs.

So, my question is whether ROOT requires xfs or can be run using fontconfig/xft? If it doesn’t require xfs, how do I configure the build for this? If there is no way around it, I will continue trying to find a way to get xfs on my computer. I think eventually, this will have to be dropped, however, since xfs is definitely going away.

Thanks,
Dan

Hi Dan,

This is on our todo list. In the meanwhile, you could try to enable Xft (by setting “X11.UseXft: yes” in $(ROOTSYS)/etc/system.rootrc or in your custom $(HOME)/.rootrc file), even if I think it needs xfs too…

Cheers, Bertrand.

Yes, I have tried enabling X11.UseXft and it doesn’t work without xfs. I suppose I have no choice but to try to install xfs now. I’ll look into it.

Hi,

I guess I’m running into the same problem (trying to use root within a CentOS7 docker container).

I’d be interested to know how (if) you manage to get it working in the end ?

Thanks,

I never was able to find enough time to get this to work. Sorry.

OK. Too bad, but thanks for the quick answer.
Regards,

Try:
root-config --has-xft
and if you get “yes”, edit your:
root-config --etcdir/system.rootrc
and set:
X11.UseXft: yes

That won’t work unless xfs is installed, which is not true be default in this distro.

Hi,

Actually yes, my root has been compiled with xft, and my .rootrc has the UseXft option set to yes, but I still get the following startup error message (see below) (and the default fonts I’d like to use don’t seem to be applied).
There’s most probably something I misunderstand here… (note that what I want in the end is be able to change the default fonts so the GUI texts are not so tiny on a high dpi screen…)

[code][AliRoot/v5-08-16-1] / > root-config --has-xft
yes
[AliRoot/v5-08-16-1] / > root
Couldn’t find font “-adobe-helvetica-medium-r---10-----*-iso8859-1”,
trying “fixed”. Please fix your system so helvetica can be found,
this font typically is in the rpm (or pkg equivalent) package
XFree86-[75,100]dpi-fonts or fonts-xorg-[75,100]dpi.


  •                                     *
    
  •    W E L C O M E  to  R O O T       *
    
  •                                     *
    
  • Version 5.34/30 23 April 2015 *
  •                                     *
    
  • You are welcome to visit our Web site *
  •      http://root.cern.ch            *
    
  •                                     *
    

ROOT 5.34/30 (heads/v5-34-00-patches@v5-34-28-57-gec27989, Aug 29 2016, 10:54:00 on linuxx8664gcc)

CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] gEnv->GetValue(“X11.UseXft”,"")
(const char* 0xb9dfd9)"yes"
root [1]
[/code]

So, you are missing fonts … try to install:
xorg-x11-fonts-ISO8859-1-75dpi
Then try:
xlsfonts |grep -i “helvetica-medium-r”

If you still get the “missing font” message, try to modify your:
root-config --etcdir/system.rootrc
and change different “Gui.*Font” settings to use “-11-” instead of “-10-”, for example.

BTW. Note that for the “X Font library (Xft)” client-side font API to work, appropriate X11 fonts must be installed on the “X11 client” machine (i.e. where you run ROOT). On Ubuntu 14 and 16 one possibly needs to install “gsfonts-x11” (and/or “xfonts-scalable” and/or “fonts-dejavu-core”) while on CentOS 6 and 7 “urw-fonts” (and/or “xorg-x11-fonts-Type1” and/or “dejavu-sans-fonts”) packages.

P.S. I don’t think you need “X Font Server (xfs)” at all. I use Ubuntu, which does not provide it.

Ahem… I guess I’ve mixed up client and server. Was installing my fonts on the server… :blush:

Now, with the proper fonts on the client, I can indeed change them, e.g. in my .rootrc :

Gui.DefaultFont: --dejavu sans mono-medium-r---24------iso8859-1

Thanks,