Bug 634039 - encodings in /usr/share/X11/fonts/encodings/large are not read by X server
encodings in /usr/share/X11/fonts/encodings/large are not read by X server
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: xorg-x11-fonts (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Peter Hutterer
Fedora Extras Quality Assurance
: Reopened, Triaged
: 658363 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-14 22:04 EDT by Daiki Ueno
Modified: 2011-01-31 04:14 EST (History)
7 users (show)

See Also:
Fixed In Version: xorg-x11-fonts-7.2-12.fc14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-12-07 08:07:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Daiki Ueno 2010-09-14 22:04:17 EDT
Description of problem:
Installing font encoded in "large" encoding set prevents native X applications starting up normally.

Version-Release number of selected component (if applicable):
xorg-x11-fonts-misc-7.2-9.fc12

How reproducible:
Always.

Steps to Reproduce:
1. Install a font encoded in any of the encoding defined in /usr/share/X11/fonts/encodings/large/*.  For example, cjkuni-uming-fonts
2. Run a native X application like xcalc
  
Actual results:
You will see the warning on the terminal:
 Warning: Missing charsets in String to FontSet conversion
 Warning: Unable to load any usable fontset

Even worse, some applications (including m17n-edit in m17n-lib-tools) abort with:
 Error: Aborting: no fontset found

Also, you will see errors in /var/log/Xorg.0.log:
 FreeType: couldn't find encoding 'gb2312.1980-0' for '/usr/share/fo
nts/cjkuni-uming/uming.ttc'

Expected results:
No warnings will be shown and every application should not abort.

Additional info:
This is because X server does not read encoding files in /usr/share/X11/fonts/encodings/large, while it reads files in /usr/share/X11/fonts/encodings.

Possible solutions are:
1. Move the encoding files from the "large" subdir to the upper dir
2. Generate encodings.dir in /usr/share/X11/fonts/encodings with entries for "large" subdir.

I guess there may have been some reason not to generate encodings.dir, though I couldn't find any clue from the changelog.
Comment 1 Edward Sheldrake 2010-10-26 09:55:12 EDT
I don't think even the encodings in /usr/share/X11/fonts/encodings are read without the encodings.dir file, e.g. from my Xorg.0.log

FreeType: couldn't find encoding 'iso8859-13' for '/usr/share/fonts/sazanami/mincho/sazanami-mincho.ttf'

iso8859-13 is:
/usr/share/X11/fonts/encodings/iso8859-13.enc.gz

It is possible for encodings.dir to list the contents of multiple directories:
# cd /usr/share/X11/fonts/encodings
# mkfontdir -n -e /usr/share/X11/fonts/encodings -e /usr/share/X11/fonts/encodings/large
Comment 2 Edward Sheldrake 2010-11-16 06:58:13 EST
The encodings.dir files are missing because the steps to generate them were moved (years ago) from %post to %install, but the %ghost was not removed from them in the %files list.

The command to generate the encodings.dir file is still in xorg-x11-fonts.spec.
Comment 3 Matěj Cepl 2010-11-16 09:12:04 EST
Peter, you were doing something in xorg-x11-fonts recently. What do you think about comment 2?
Comment 4 Matěj Cepl 2010-11-16 09:20:34 EST
Moreover, reporter, are you able to reproduce the issue with the latest builds from http://koji.fedoraproject.org/koji/packageinfo?packageID=368 ?
Comment 5 Daiki Ueno 2010-11-17 04:14:23 EST
Yes, I can reproduce it on either F-14 and today's rawhide, with xorg-x11-fonts-7.2-11.fc14 and xorg-x11-fonts-7.5-2.fc15 respectively.
Comment 6 Peter Hutterer 2010-11-18 23:23:24 EST
Theory goes that these two scratch builds may fix it (though I admit to stabbing into the dark a bit)

http://koji.fedoraproject.org/koji/taskinfo?taskID=2610476
http://koji.fedoraproject.org/koji/taskinfo?taskID=2610479
Comment 7 Daiki Ueno 2010-11-19 00:58:23 EST
Thank you, it now seems to work, except for trifling error messages when installing xorg-x11-fonts-misc:

sed: -e expression #1, char 0: no previous regular expression
sed: can't read large/encodings.dir: No such file or directory

Perhaps the following lines in xorg-x11-fonts-update-dirs:

    sed -i "s@$RPM_BUILD_ROOT@@" encodings.dir
    sed -i "s@$RPM_BUILD_ROOT@@" large/encodings.dir

should be:

    sed -i "s@\$RPM_BUILD_ROOT@@" encodings.dir

?
Comment 8 Matěj Cepl 2010-11-19 03:45:31 EST
(In reply to comment #7)
> should be:
> 
>     sed -i "s@\$RPM_BUILD_ROOT@@" encodings.dir

Did you test it? It seems to me that another culprit could be problem (if I am not mistaken, variables expansion happens BEFORE running the command). What about

     sed -i "s@${RPM_BUILD_ROOT}@@" encodings.dir

But no, I haven't tested it either (OTOH I don't have set up environment and packages to know how to reproduce the original bug in the first place).
Comment 9 Daiki Ueno 2010-11-19 04:05:32 EST
Sorry my comment 7 was pointless.  After looking at the new spec, I think these lines are not necessary at all, since the script is only called in %post and %postun.  Perhaps a wreck of cut & paste from %install? :)
Comment 10 Peter Hutterer 2010-11-21 19:02:40 EST
updated build now available in koji:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2614960

I think this should close the bug then, thanks for testing.
Comment 11 Peng Wu 2010-12-02 21:11:52 EST
Could you make updates for Fedora 13/14 with this fix?
I received a bug report about this, See:
Bug 658363 - Several fonts interfere with citrix receiver
Comment 12 Fedora Update System 2010-12-06 22:27:04 EST
xorg-x11-font-utils-7.4-3.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/xorg-x11-font-utils-7.4-3.fc14
Comment 13 Fedora Update System 2010-12-06 22:35:45 EST
xorg-x11-font-utils-7.2-12.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/xorg-x11-font-utils-7.2-12.fc13
Comment 14 Peter Hutterer 2010-12-06 22:37:00 EST
please provide stable karma to these two so I can push the actual bugfix out.
Comment 15 Andre Robatino 2010-12-07 18:37:10 EST
I was able to reproduce the problem in the OP with F14 with updates-testing and all updates including today's, after installing xcalc and cjkuni-uming-fonts. I see both the message "Warning: Unable to load any usable fontset
" on the command line when running xcalc, and the error in Xorg.0.log. I didn't provide negative karma since I didn't test bug 655925.

xorg-x11-font-utils-7.4-3.fc14.x86_64
xcalc-1.0.3-5.fc14.x86_64
cjkuni-uming-fonts-0.2.20080216.1-45.fc14.noarch
Comment 16 Peter Hutterer 2010-12-08 00:01:06 EST
Andre, please note that the actual bugfix isn't in yet. The fix will be in xorg-x11-fonts, but before we can do so, xorg-x11-font-utils needs to be in updates. xorg-x11-fonts relies on a new file added to -utils.
Comment 17 Fedora Update System 2010-12-11 19:01:55 EST
xorg-x11-font-utils-7.4-3.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 18 Fedora Update System 2010-12-12 18:49:45 EST
xorg-x11-fonts-7.2-12.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/xorg-x11-fonts-7.2-12.fc14
Comment 19 Fedora Update System 2010-12-17 03:37:58 EST
xorg-x11-fonts-7.2-12.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 20 Andre Robatino 2010-12-20 18:18:14 EST
Still seeing this (for example, same warnings with xcalc, and m17n-edit fails to run) - is the bugfix supposed to be in place?

xorg-x11-fonts-ISO8859-1-100dpi-7.2-12.fc14.noarch
xorg-x11-font-utils-7.4-3.fc14.x86_64
cjkuni-uming-fonts-0.2.20080216.1-45.fc14.noarch

If I install xorg-x11-fonts-misc-7.2-12.fc14.noarch, the problem appears fixed, though. Should this be a dependency?
Comment 21 Fedora Update System 2010-12-24 19:26:17 EST
xorg-x11-font-utils-7.2-12.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 22 Peter Hutterer 2011-01-03 20:31:43 EST
(In reply to comment #20)
> If I install xorg-x11-fonts-misc-7.2-12.fc14.noarch, the problem appears fixed,
> though. Should this be a dependency?

only some fonts update the encodings directory. misc is one of them, ISO8859-1 isn't for some reason. so if you don't have one of the fonts installed that  update the encodings dir, nothing happens when you update. not sure what the proper behaviour should be. (note that I mostly operate blind here, haven't done much with the font package for fonts in general)
Comment 23 Akira TAGOH 2011-01-31 04:14:00 EST
*** Bug 658363 has been marked as a duplicate of this bug. ***

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