Bug 9839 - xterm fails "Unable to load any usable iso8859 font"
Summary: xterm fails "Unable to load any usable iso8859 font"
Status: RESOLVED FIXED
Alias: None
Product: cygwin
Classification: Unclassified
Component: Cygwin/X (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Yaakov Selkowitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-12 17:34 UTC by Jon Turney
Modified: 2009-02-24 05:33 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Turney 2009-02-12 17:34:53 UTC
http://cygwin.com/ml/cygwin-xfree/2009-02/msg00000.html

Installing the "font-misc-misc" package is a workaround.

But, no, it's not the obvious packaging error that "font-misc-misc" should be in
the dependencies for packages which use the 'fixed' font, as that font is now
available 'built-in' to the server and the server starts with no fonts installed.

It seems the specific error message quoted "Unable to load any usable ISO8859
font", comes from libXt [1], when it has failed to find the requested font, it
tries a fallback of "-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-*", which should match
the always-available, built-in fixed font.

I have no problems starting xterm just using the built-in fonts

$ xset fp built-ins
[or start the server with -fp built-ins, or uninstall all font packages]
$ xlsfonts -fn "-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-*"
-misc-fixed-medium-r-semicondensed--12-120-75-75-c-0-iso8859-1
-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1
$ xterm
[starts with no error]

So, why some people see this error is a mystery to me.  The first post in this
thread seems to pin the blame on something which changed recently, possibly
xserver 1.5.3-5, but I can't reproduce it and can't see any changes which seem
likely suspects...
Comment 1 Yaakov Selkowitz 2009-02-12 19:54:38 UTC
I cannot reproduce this either with -6 or the pending -7.  I even moved my
/usr/share/fonts out of the way, started XWin then xterm:

Warning: Cannot convert string
"-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "nil2" to type FontStruct

But no errors, and xterm runs.
Comment 2 Jon Turney 2009-02-12 21:51:37 UTC
I think I can reproduce this thanks to a conversation on IRC.  If you install
font-adobe-75dpi (and it's dependencies, font-encodings and font-alias) but
*not* font-misc-misc, that seems to show the problem.  Possibly fonts.alias
causes the problem, somehow.
Comment 3 Jon Turney 2009-02-13 18:27:28 UTC
Yes, it seems xterm causes libXt to actually ask for
""-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-*"", which will match
"-misc-fixed-medium-r-normal--15-120-100-100-c-90-iso8859-1" or
"-misc-fixed-bold-r-normal--15-120-100-100-c-90-iso8859-1" lines 
in misc/fonts.alias (because that occurs before built-ins in the font path),
which alias these to there 75dpi equivalents, but that doesn't match the actual
built-in font.

Not sure what the correct way to fix this is....
Comment 4 Yaakov Selkowitz 2009-02-13 18:41:31 UTC
(In reply to comment #3)
> Yes, it seems xterm causes libXt to actually ask for
> ""-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-*"", which will match
> "-misc-fixed-medium-r-normal--15-120-100-100-c-90-iso8859-1" or
> "-misc-fixed-bold-r-normal--15-120-100-100-c-90-iso8859-1" lines 
> in misc/fonts.alias (because that occurs before built-ins in the font path),
> which alias these to there 75dpi equivalents, but that doesn't match the actual
> built-in font.
> 
> Not sure what the correct way to fix this is....

Have libXt6 depend on font-misc-misc?
Comment 5 Jon Turney 2009-02-14 18:17:34 UTC
(In reply to comment #4)
> > Not sure what the correct way to fix this is....
> 
> Have libXt6 depend on font-misc-misc?

This fixes the specific problem, but I think the general issue is that
misc/font.aliases can remap a font name which could be satisfied by the fixed
built-in into one which cannnot, but misc/ will not provide the font unless
font-misc-misc is installed.

So you're basically back at having the server depend on font-misc-misc, unless
you want to try wacky solutions like adding a 100 dpi fixed font (9x18, I think)
to the built-ins, or adding a bunch of aliases to built-ins to map the aliases
in misc/font.aliases back to 75dpi names...
Comment 6 Yaakov Selkowitz 2009-02-18 08:54:15 UTC
I'm wondering if we should be looking at this differently.  Right now, most
fonts requires: font-alias font-encodings.  I don't remember what I based that
on, but is that actually necessary?  Perhaps, instead of everything depending on
font-alias, maybe we should treat font-alias as just another font package, but
have it depend on everything it aliases to?
Comment 7 Yaakov Selkowitz 2009-02-23 02:09:53 UTC
The deps for font-alias would be:

75dpi/fonts.alias:
font-bh-dpi75
font-bh-lucidatypewriter-dpi75

100dpi/fonts.alias:
font-bh-dpi100
font-bh-lucidatypewriter-dpi100

cyrillic/fonts.alias:
font-cronyx-cyrillic
font-misc-cyrillic
font-screen-cyrillic

misc/fonts.alias:
font-adobe-dpi75
font-isas-misc
font-jis-misc
font-misc-misc
font-sony-misc
font-sun-misc

That would be 13 of the ~40 font packages.  Thoughts?
Comment 8 Yaakov Selkowitz 2009-02-24 05:33:53 UTC
Ports SVN r5824:
xorg/font-*: font-alias is not a dependency of any font, but font-alias
depends on the fonts it references.  We explicitely requires: font-misc-misc,
so that libXt can find its fallback font.  Fixes sourceware bug 9839.

Fixed on sourceware as well; closing.