Bug 478420 - xorg-x11-server-Xorg-1.5.99 does not acces to system fonts
xorg-x11-server-Xorg-1.5.99 does not acces to system fonts
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: xorg-x11-server (Show other bugs)
rawhide
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Adam Jackson
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-29 15:20 EST by Yves L'ECUYER
Modified: 2009-05-08 17:30 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-08 17:30:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
a sample C prog to use XLoadQueryFont, and a widget XmText using the fonts (2.15 KB, text/plain)
2008-12-29 15:20 EST, Yves L'ECUYER
no flags Details
my current xorg.conf as built by the nVidia Display Setting in "System Tools" (1.84 KB, text/plain)
2009-01-10 06:04 EST, Yves L'ECUYER
no flags Details
The Xorg.0.log with my currently used xorg.conf (17.36 KB, text/plain)
2009-01-10 06:16 EST, Yves L'ECUYER
no flags Details
a simple xorg.conf rebuilt automatically (421 bytes, text/plain)
2009-01-10 06:20 EST, Yves L'ECUYER
no flags Details
associated Xorg.0.log to basic xorg.conf (16.95 KB, text/plain)
2009-01-10 06:30 EST, Yves L'ECUYER
no flags Details
xserver-1.5.99.3-font-path.patch (7.78 KB, text/plain)
2009-01-10 15:05 EST, Yves L'ECUYER
no flags Details
modified xorg-x11-server.spec to use the new patch (33.84 KB, text/plain)
2009-01-10 15:14 EST, Yves L'ECUYER
no flags Details
Google Earth before correction of xorg-x11-server (103.91 KB, image/jpeg)
2009-01-10 15:16 EST, Yves L'ECUYER
no flags Details
Google Earth after correction of xorg-x11-server (93.08 KB, image/jpeg)
2009-01-10 15:20 EST, Yves L'ECUYER
no flags Details

  None (edit)
Description Yves L'ECUYER 2008-12-29 15:20:55 EST
Created attachment 327929 [details]
a sample C prog to use XLoadQueryFont, and a widget XmText using the fonts

Description of problem:

When i try to launch application using X11 text Widget, the font cannot be found.
With or without xfs started, with or without Selinux enabled, with our without FontPath declared in xorg.conf, with nv , vesa or nvdia drivers, I always get the same error:
examples of output:
$ xterm 
    Warning: Cannot convert string "nil2" to type FontStruct
$ xterm -fn 10x20
Warning: Cannot convert string "nil2" to type FontStruct
xterm:  unable to open font "10x20", trying "fixed"....

A sample C prog like the one in joined peice 
(compiled with : gcc *.c -o test_fonts -l X11 -l Xm), 
show the same behaviour than Xterm above; the problem occurs when XLoadQueryFont has no answer.

The problem is also visible with:
# xlsfonts 
-misc-fixed-medium-r-semicondensed--0-0-75-75-c-0-iso8859-1
-misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1
6x13
cursor
fixed
---------------------
THAT's ALL, a pity !
Of course if I redirect the client towards a good xserver of an other machine:
like:
# export DISPLAY=ismf34:0.0 (ismf34 the remote server)
$ xterm -fn 10x20
$ test_fonts 
all is shown correctly on the remote server, with no error message about font not found, on client side where I launch these commands





Version-Release number of selected component (if applicable):1.5.99


How reproducible:always


Steps to Reproduce:
1.launching xterm -fn <any standard fonts shown by xlsfonts on a good server>
2.
3.
  
Actual results:
always fixed fonts is used


Expected results:
using the given font

Additional info:
Comment 1 Matěj Cepl 2009-01-07 09:22:52 EST
Thanks for the bug report.  We have reviewed the information you have provided above, and there is some additional information we require that will be helpful in our diagnosis of this issue.

Please attach your X server config file (/etc/X11/xorg.conf, if available) and X server log file (/var/log/Xorg.*.log) to the bug report as individual uncompressed file attachments using the bugzilla file attachment link below.

Could you please also try to run without any /etc/X11/xorg.conf (if you have one) whatsoever and let X11 autodetect your display and video card? Attach to this bug /var/log/Xorg.0.log from this attempt as well, please.

Does replacing the line

       FontPath     "unix/:7100"

in /etc/X11/xorg.conf with

       FontPath     "catalogue:/etc/X11/fontpath.d"

does help? Did you upgrade to this distro, or is it a clean installation? If yes to both questions, than this is probably duplicate of bug 478323.

We will review this issue again once you've had a chance to attach this information.

Thanks in advance.
Comment 2 Masao Takahashi 2009-01-09 02:09:10 EST
Current Xserver develoment version is Xorg-x11-server-1.5.99.3-8.
"dixfont.c" has builin-fonts only logic as belows.

 #ifdef BUILTIN_FONTS
   BuiltinRegisterFpeFunctions();
 #else
   FontFileRegisterFpeFunctions();
   fs_register_fpe_functions();
 #endif

So Xserver can not access other fonts except builin-fonts.

Now I find a git log within freedesktop git server to disable the above logic.
Here is a link.
   http://cgit.freedesktop.org/xorg/xserver/commit/?id=49b93df8a3002db7196aa3fc1fd8dca1c12a55d6
Comment 3 Yves L'ECUYER 2009-01-10 06:04:38 EST
Created attachment 328616 [details]
my current xorg.conf as built by the nVidia Display Setting in "System Tools"

You just will sea a comment on line on fisrt line below, because I tries this (it's not added by any configuration tool)
---------------------------------------------------------
#       FontPath     "unix/:7100"
        FontPath     "catalogue:/etc/X11/fontpath.d"
----------------------------------------------------------

but any way with both lines active, without none of this lines , or with one of then, the X11 clients cannot access to any fonts
Comment 4 Yves L'ECUYER 2009-01-10 06:16:58 EST
Created attachment 328617 [details]
The Xorg.0.log with my currently used xorg.conf

Just note that I continue to use kernel 2.6.28-3, because it's the only one I can use with NVIDIA modules from following packages:
------------------------------------------------------------------
# rpm -qa | grep nvidia
kmod-nvidia-2.6.29-0.18.rc0.git9.fc11.x86_64-180.22-1.fc11.x86_64
xorg-x11-drv-nvidia-libs-180.22-1.fc11.x86_64
akmod-nvidia-180.22-1.fc11.x86_64
kmod-nvidia-2.6.29-0.12.rc0.git7.fc11.x86_64-180.18-1.fc11.x86_64
kmod-nvidia-2.6.28-3.fc11.x86_64-180.22-1.fc11.x86_64
xorg-x11-drv-nvidia-180.22-1.fc11.x86_64
kmod-nvidia-180.22-1.fc11.x86_64
------------------------------------------------------------------

I update regularly the kernel 2.6.29*.git*fc11, but Until now I NEVER get NVIDIA usable with this kernel:
when I launch: X -ignoreABI, the screen remain blacks some second and then give me back prompt shell, without any error !!!!
So currently the best kernel for me, let me using nVidia OpenGL and use natively my Hauppauge Hauppauge WinTV-HVR-4000 is the 2.6.28-3.fc11.x86_64 one!
Comment 5 Yves L'ECUYER 2009-01-10 06:20:29 EST
Created attachment 328618 [details]
a simple xorg.conf rebuilt automatically

This file is the one set automatically, after I removed xorg.conf from /etc/X11 directory, and then rebooted my machine

The following attachment is corresponding /var/log/Xorg.0.log
Comment 6 Yves L'ECUYER 2009-01-10 06:30:31 EST
Created attachment 328619 [details]
associated Xorg.0.log to basic xorg.conf

So note that with or without different font paths in xorg.conf it doesn't help

I Installed Fedora 10.90 by migration from a standard Fedora 10, after installation of :
   rpm -U fedora-release-10.90-1.noarch.rpm

and then a:
   yum update yum

and then :
   yum install rpmfusion-free-release  rpmfusion-nonfree-release

cuurently hereis my release package:
# rpm -qa | grep release
rpmfusion-free-release-10.90-1.noarch
flash-plugin-10.0.12.36-release.i386
fedora-release-notes-10.0.0-1.noarch
rpmfusion-nonfree-release-10.90-1.noarch
livna-release-9-2.noarch
fedora-release-10.90-1.noarch

I a updated all my distro with
yum update:

today: Sat Jan 10 12:28:16 CET 2009
here is my situation:
# yum check-update
Loaded plugins: refresh-packagekit

gawk.x86_64                         3.1.6-3.fc11                         rawhide


Only gawk remain not updated, because this package is broken in all repositories!!!!

So quite all my distro is at *fc11* level now.
Comment 7 Yves L'ECUYER 2009-01-10 07:36:37 EST
Thanks to  Matej and to Masao for your help
and thanks to Masao for the link:
http://cgit.freedesktop.org/xorg/xserver/commit/?id=49b93df8a3002db7196aa3fc1fd8dca1c12a55d6

I'm gonna try to integrate this patch proposal, in the xorg-11-server fc11 source for my own binary rpm package, waiting for final solution from Xorg.

I'll give you here the reult of my experiment
Comment 8 Yves L'ECUYER 2009-01-10 14:59:03 EST
Thanks again to Masao for suggested link:
http://cgit.freedesktop.org/xorg/xserver/commit/?id=49b93df8a3002db7196aa3fc1fd8dca1c12a55d6

It was not that obvious for me because I never use this king of site, dedicated to git, in particular it was painful to extract patch in plain text file, from the html one.

So I downloaded the latest : xorg-x11-server-1.5.99.3-8.fc11.src.rpm
started the rpmbuils ans then made a back up in *.ori of all four files:

configure.ac
dix/dixfonts.c
hw/xfree86/common/xf86Config.c
include/dixfont.h

An then patched carefully these files by hand, following the template given in the link above, removing the red lines and adding the green ones.

The problem is that the original files in xorg-x11-server-1.5.99.3-8.fc11.src.rpm
are a little different from the ones given on this site, for:
    xf86Config.c
and dixfont.h

That's the reason why my plain text patch regenerated by diff -u is quite different from the one, given in html format on this site.
For dixfont.h, I just added all the ending lines, provided by:
http://cgit.freedesktop.org/xorg/xserver/tree/include/dixfont.h?id=49b93df8a3002db7196aa3fc1fd8dca1c12a55d6

Then I added an artificial beginning at the top of my patch (given here):
-------------------------------------------------------------------------
From 70e14e1dd95ba965ffd3264af1f2d4b207c67f73 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Wed, 7 Jan 2009 17:14:34 -0500
Subject: [PATCH] xf86Config: turn on usage of preferred fontpath again.
---
copied as template from:
xserver-1.5.99.3-offscreen-pixmaps.patch
just to pass the test:

git am -p1 $(awk '/^Patch.*:/ { print "%{_sourcedir}/"$2 }' %{_specdir}/%{name}.spec)

done by rpmbuild, otherwise I got an Invalid adress error.

In  xorg-x11-server.spec, I just added :

# to allow old usage of fontpath
Patch6008: xserver-1.5.99.3-font-path.patch

(after the 6007 patch), an incremented by one, the release:

Release:   9%{?dist}

The rpmbuild -bb xorg-x11-server.spec, was done without error, and I got:
xorg-x11-server-common-1.5.99.3-9.fc11.x86_64.rpm
xorg-x11-server-debuginfo-1.5.99.3-9.fc11.x86_64.rpm
xorg-x11-server-devel-1.5.99.3-9.fc11.x86_64.rpm
xorg-x11-server-source-1.5.99.3-9.fc11.x86_64.rpm
xorg-x11-server-Xdmx-1.5.99.3-9.fc11.x86_64.rpm
xorg-x11-server-Xephyr-1.5.99.3-9.fc11.x86_64.rpm
xorg-x11-server-Xnest-1.5.99.3-9.fc11.x86_64.rpm
xorg-x11-server-Xorg-1.5.99.3-9.fc11.x86_64.rpm
xorg-x11-server-Xvfb-1.5.99.3-9.fc11.x86_64.rpm

I just made an Update of the installed components on my machine with:
        rpm -Uvh xorg-x11-server-common*.x86_64.rpm \
        xorg-x11-server-Xnest*.x86_64.rpm \
        xorg-x11-server-Xephyr*.x86_64.rpm \
        xorg-x11-server-Xorg*.x86_64.rpm
and put back again my original xorg.conf in /etc/X11/xorg.conf
with just one reference to FontPath, like sample below:
----------------------------------
Section "Files"
        ModulePath   "/usr/lib64/xorg/modules/extensions/nvidia"
        ModulePath   "/usr/lib64/xorg/modules"
#       FontPath     "unix/:7100"
        FontPath     "catalogue:/etc/X11/fontpath.d"
EndSection
--------------------------------------

I restarted my X session with startx& (cause I prefer to work in RUNLEVEL 3)

and THEN ALL WAS WORKING FINE: xterm, xnetload, seamonkey, RealPlayer 8 (I use it in addition to the RealPlayer 11, and over all the famous GOOGLEMAP, ans so on.
You will find here also the pityfull GOOGLEMAP, without correct font access
and its normal look after the fonts are usable again with patch:

xserver-1.5.99.3-font-path.patch

Now somebody in Fedora team has to integrate a well built patch in fc11 xorg-x11-server, waiting for a definitive solution from Xorg team, otherwise many third party applications will remain unusable !
Comment 9 Yves L'ECUYER 2009-01-10 15:05:05 EST
Created attachment 328635 [details]
xserver-1.5.99.3-font-path.patch

The patch to include in SOURCES directory, after installation of original source:
rpm -i xorg-x11-server-1.5.99.3-8.fc11.src.rpm
Comment 10 Yves L'ECUYER 2009-01-10 15:14:45 EST
Created attachment 328636 [details]
modified  xorg-x11-server.spec to use the new patch

all this comments are for newbies of course, if ever they want to rebuild their own package , waiting for a clean solution from official fedora 10.90 rawhide repository.

Put this new xorg-x11-server.spec  in /root/rpmbuild/SPECS
and from this directory launch:

rpmbuild -bb xorg-x11-server.spec
to get the new package in /root/rpmbuild/RPMS

as you will see in the last lines output by a successful rpmbuild
Comment 11 Yves L'ECUYER 2009-01-10 15:16:36 EST
Created attachment 328637 [details]
Google Earth before correction of xorg-x11-server
Comment 12 Yves L'ECUYER 2009-01-10 15:20:18 EST
Created attachment 328638 [details]
Google Earth after correction of xorg-x11-server

sorry for some comments in the previous post, when i talked about ggoogle map, I wanted to say GOOGLE EARTH of course
Comment 13 Adam Jackson 2009-05-08 17:30:53 EDT
Works fine in 1.6.1-12.

Note You need to log in before you can comment on or make changes to this bug.