Bug 605982 - LANG unexpectedly changes behavior of XCreateFontSet() and XFontsOfFontSet()
LANG unexpectedly changes behavior of XCreateFontSet() and XFontsOfFontSet()
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libX11 (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Adam Jackson
Desktop QE
: Triaged
Depends On:
Blocks: 842499
  Show dependency treegraph
 
Reported: 2010-06-19 15:01 EDT by Quentin Barnes
Modified: 2017-12-06 06:38 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-12-06 06:38:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Sample program and sample output of problem (2.22 KB, application/x-bzip2)
2010-06-19 15:01 EDT, Quentin Barnes
no flags Details
getfont-C.log.txt while testing here (350 bytes, text/plain)
2010-06-21 12:59 EDT, Matěj Cepl
no flags Details
getfont-csCZ.log.txt while testing here (2.19 KB, text/plain)
2010-06-21 12:59 EDT, Matěj Cepl
no flags Details
getfont-enUS.log.txt while testing here (2.19 KB, text/plain)
2010-06-21 12:59 EDT, Matěj Cepl
no flags Details

  None (edit)
Description Quentin Barnes 2010-06-19 15:01:11 EDT
Created attachment 425371 [details]
Sample program and sample output of problem

Description of problem:
I truly don't know if my window manager (ctwm-3.8a) has a
programming bug in it or if this is a problem with XCreateFontSet()
and XFontsOfFontSet() and the environment variable LANG on RHEL6
(or maybe both are wrong?).

Under RHEL6, ctwm was assuming large ascents and descents for fonts
from font "-urw-century schoolbook" being selected and with ascents
of 16 and 17 and descents of 4 and 6.  So in window title bars,
menus, etc. rendered by the window manager, it had huge white space
above and below making title bars huge and menu huge with all that
wasted space.

I tracked the problem down to $LANG (autoset to "en_US.UTF-8" in
RHEL6).  When I unset LANG before launching my window manager (or
set LANG=C), my window manager's menus and title bars all looked
normal again.  I sifted through the ctwm code and ripped out the
pieces required to reproduce the problem, but like I said, I don't
know if it's a problem with the XFontsOfFontSet() library call and
LANG or how my window manager is using it.  Maybe someone who knows
X11 programming well can glance at the output and chime in.

The result returned by XFontsOfFontSet() is what I would expect when
LANG is unset (or when LANG=C).  I don't see why when LANG is set
to "en_US.UTF-8" XFontsOfFontSet() is returning a whole bunch more
fonts that aren't a good match.

Version-Release number of selected component (if applicable):
libX11-1.3-1.el6.x86_64
xorg-x11-fonts-*.el6.noarch (built many from SRPM myself since most not included in Beta ISO)

How reproducible: 100%


Steps to Reproduce:
1. Build and run attached program "getfont" under RHEL5 and RHEL6 with and without LANG set.
2. LANG=en_US.UTF-8 ./getfont "-adobe-new century schoolbook-bold-r-normal--*-100-*"
3. unset LANG; ./getfont "-adobe-new century schoolbook-bold-r-normal--*-100-*"
  
Actual results:
When LANG is set to "en_US.UTF-8", I wouldn't expect so many fonts
to be returned that aren't close to what was requested.  Should
"missing_charset_count_return=1" be in the output either?

Expected results:
See "getfont.out.rhel5" output in attachment.


Additional info:
In tarchive:
Makefile	- builds "getfont" test program
getfont.c	- Source of program to reproduce issue hacked up from ctwm sources
getfont.out.rhel5 - Sample output from getfont on RHEL5
getfont.out.rhel6b - Sample output from getfont on RHEL6 Beta
Comment 2 RHEL Product and Program Management 2010-06-19 15:32:53 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Matěj Cepl 2010-06-21 12:59:01 EDT
Created attachment 425696 [details]
getfont-C.log.txt while testing here
Comment 4 Matěj Cepl 2010-06-21 12:59:08 EDT
Created attachment 425697 [details]
getfont-csCZ.log.txt while testing here
Comment 5 Matěj Cepl 2010-06-21 12:59:15 EDT
Created attachment 425698 [details]
getfont-enUS.log.txt while testing here
Comment 7 Matěj Cepl 2010-06-23 08:07:27 EDT
Similar Fedora bug is bug 605748
Comment 8 RHEL Product and Program Management 2010-07-15 10:21:42 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 10 RHEL Product and Program Management 2011-01-07 10:41:51 EST
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.
Comment 12 Jan Kurik 2017-12-06 06:38:00 EST
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/

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