maps Courier to invisible (zero-sized?) font

Bug #13617 reported by Debian Bug Importer
8
Affects Status Importance Assigned to Milestone
fontconfig (Debian)
Fix Released
Unknown
fontconfig (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

Automatically imported from Debian bug report #298435 http://bugs.debian.org/298435

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #298435 http://bugs.debian.org/298435

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (9.0 KiB)

Message-Id: <email address hidden>
Date: Mon, 07 Mar 2005 15:35:18 +0100
From: Eduard Bloch <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: maps Courier to invisible (sero-sized?) font

Package: fontconfig
Version: 2.2.3-4
Severity: grave

Hello,

when I configure fontconfig to not use bitmap fonts, I get invisible
fonts using any xft application (gvim, flash plugin, firefox) when
Courier is beeing requested. It is even worse:

urxvt -fn "xft:Courier"
Floating point exception

strace shows me that it happens directly after some font providing
courier is beeing accessed, eg.
/usr/share/fonts/truetype/ms/coue1257.fon
Even if I remove one of the courier providers, it crashes on another
one.

If I enable bitmap fonts, I get some ugly fonts in Xft using
applications (except of urxvt, this one still crashes).

I cannot explain that. Courier New looks fine, and fonts.conf contains
<alias>
<family>Courier</family>
<accept><family>Courier New</family></accept>
</alias>

I have only my truetype fonts from windows, bitstream-vera-sans and few
others.

> root < @debian:/usr/share/fonts/truetype$ ls
arhangai dustin kochi ttf-bitstream-vera
arphic fonts.cache-1 ms ttf-xfree86-nonfree
baekmuk freefont openoffice ttf-xfree86-nonfree-syriac

My fc-list output:

Dustismo:style=Regular
Luxi Serif:style=Regular
SylfaenARM:style=Regular
8514oem:style=Regular
Nimbus Sans L:style=Regular Italic
Free Helvetian Condensed:style=Oblique
Marked Fool:style=Regular
Bitstream Vera Sans Mono:style=Bold
Arial:style=Regular
Gautami:style=Regular
Webdings:style=Regular
Verdana:style=Bold Italic
Trebuchet MS:style=Bold Italic
Serto Malankara:style=Regular
Free Schoolbook:style=Bold Italic
Dustismo:style= Bold
URW Palladio L:style=Roman
Century Schoolbook L:style=Bold Italic
Luxi Serif:style=Bold
AR PL SungtiL GB:style=Regular
Free Helvetian Condensed:style=Regular
Free Bookman:style=Demi Italic
Latha:style=Regular
Serto Mardin:style=Regular
Kochi Mincho:style=Regular
FreeMono:style=BoldOblique
Trebuchet MS:style=Italic
Bitstream Vera Sans:style=Oblique
Domestic Manners:style=Regular
Estrangelo Edessa:style=Regular
Serto Kharput:style=Regular
Wine Marlett:style=Regular
Comic Sans MS:style=Bold
Nimbus Sans L:style=Bold
Microsoft Sans Serif:style=Regular
OpenSymbol:style=Regular
Luxi Mono:style=Bold
Estrangelo Nisibin:style=Regular
WST_Czec:style=Regular
FreeSans:style=Medium
WST_Swed:style=Regular
URW Chancery L:style=Medium Italic
Arhangai:style=Regular
Bitstream Vera Sans:style=Roman
Bitstream Charter:style=Bold Italic
Luxi Sans:style=Bold
Trebuchet MS:style=Regular
Serto Batnan:style=Bold
Free Paladin:style=Bold Italic
Free Schoolbook:style=Italic
Tunga:style=Regular
Times New Roman:style=Bold Italic
Lucida Console:style=Regular
Free Courier:style=Regular
Free Helvetian Condensed:style=Bold Oblique
Nimbus Roman No9 L:style=Regular
Arial Black:style=Regular
Impact:style=Regular
Times New Roman:style=Bold
Century Schoolbook L:style=Bold
Century Schoolbook L:style=Italic
Small Fonts:style=Regular
Estrangelo Midyat:style=Regular
Verdana:style=Bold
Estrangelo Talada:style=Regular
Luxi Sans:style=R...

Read more...

Revision history for this message
In , Browaeys-alban (browaeys-alban) wrote : Re: fontconfig

Hi

I had the opposite problem (font where so huge it crashed X when
application did not segfault).
It was due to teh dpi size setting : fix it by opening the gnome
font properties and changing the dpi to something rationale
(between 60 and 120, it was at 50). The bug happened even in
xinit ...
the newest kcontrol also provide access to this setting.

I never found out where this garbage dpi value came from.

I know that the X server also report teh dpi setting in
/var/log/XFree.0.log.

Could you provide both dpi value. It could still be fontconfig
reporting wrong values for the font, though from my search about
my font problem the chance are low.

Cheers
Alban

Revision history for this message
In , Eduard Bloch (edi-gmx) wrote : Re: Bug#298435: fontconfig

#include <hallo.h>
* <email address hidden> [Tue, Mar 08 2005, 07:54:35AM]:
> Hi
>
> I had the opposite problem (font where so huge it crashed X when
> application did not segfault).
> It was due to teh dpi size setting : fix it by opening the gnome
> font properties and changing the dpi to something rationale
> (between 60 and 120, it was at 50). The bug happened even in
> xinit ...

My display has 90dpi but I set Xft resolution to 80 because the default
size for 90dpi is too big [1]

# xrdb -query | grep -i xft
Xft.antialias: 1
Xft.dpi: 80,000000
Xft.hinting: 1
Xft.hintstyle: hintmedium
Xft.rgba: rgb

> I never found out where this garbage dpi value came from.

There are different ways to set the X server dpi setting, see the FAQ in
the xfree86-common package or so.

[1] Windows' fonts are not larger then the current @80dpi and nobody
complains there... why does fontconfig prefer larger font settings?! I
can send a screenshot if needed.

Regards,
Eduard.
--
* HE .oO(Das ist so blöd, dass das wieder einer als fortune submitted. *sigh*)

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 8 Mar 2005 07:54:35 +0100
From: <email address hidden>
To: <email address hidden>
Subject: Re: fontconfig

Hi

I had the opposite problem (font where so huge it crashed X when
application did not segfault).
It was due to teh dpi size setting : fix it by opening the gnome
font properties and changing the dpi to something rationale
(between 60 and 120, it was at 50). The bug happened even in
xinit ...
the newest kcontrol also provide access to this setting.

I never found out where this garbage dpi value came from.

I know that the X server also report teh dpi setting in
/var/log/XFree.0.log.

Could you provide both dpi value. It could still be fontconfig
reporting wrong values for the font, though from my search about
my font problem the chance are low.

Cheers
Alban

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <20050308073035.GA28833@debian>
Date: Tue, 8 Mar 2005 08:30:35 +0100
From: Eduard Bloch <email address hidden>
To: <email address hidden>, <email address hidden>
Subject: Re: Bug#298435: fontconfig

#include <hallo.h>
* <email address hidden> [Tue, Mar 08 2005, 07:54:35AM]:
> Hi
>=20
> I had the opposite problem (font where so huge it crashed X when
> application did not segfault).
> It was due to teh dpi size setting : fix it by opening the gnome
> font properties and changing the dpi to something rationale
> (between 60 and 120, it was at 50). The bug happened even in
> xinit ...

My display has 90dpi but I set Xft resolution to 80 because the default
size for 90dpi is too big [1]

# xrdb -query | grep -i xft
Xft.antialias: 1
Xft.dpi: 80,000000
Xft.hinting: 1
Xft.hintstyle: hintmedium
Xft.rgba: rgb

> I never found out where this garbage dpi value came from.

There are different ways to set the X server dpi setting, see the FAQ in
the xfree86-common package or so.

[1] Windows' fonts are not larger then the current @80dpi and nobody
complains there... why does fontconfig prefer larger font settings?! I
can send a screenshot if needed.

Regards,
Eduard.
--=20
* HE .oO(Das ist so bl=F6d, dass das wieder einer als fortune submitted. =
 *sigh*)

Revision history for this message
In , Keith Packard (keithp) wrote : #298435: maps Courier to invisible (sero-sized?) font

> strace shows me that it happens directly after some font providing
> courier is beeing accessed, eg.
> /usr/share/fonts/truetype/ms/coue1257.fon
> Even if I remove one of the courier providers, it crashes on another
> one.

When an application asks for a specific family (Courier), fontconfig
always provides a font from that family if any exist. This lets
applications be sure that they'll get the fonts they ask for if such fonts
are on the system.

In your case, fontconfig manages to find some stale old Windows bitmap
version of courier (coue1257.fon) which apparantly breaks applications
badly.

With fontconfig 2.2.3, disabling bitmap fonts only skipped the X11 bitmaps
in /usr/X11R6/lib/X11/... Fontconfig 2.3.1 skips all bitmap font files by
type, so selecting the 'no bitmaps' option with version 2.3.1-1 should
solve your problem.

Let me know if this isn't fixed by the new version.

-keith

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Wed, 09 Mar 2005 18:43:06 -0800
From: Keith Packard <email address hidden>
To: <email address hidden>
Cc: Keith Packard <email address hidden>
Subject: #298435: maps Courier to invisible (sero-sized?) font

--==_Exmh_-653335348P
Content-Type: text/plain; charset=utf-8

> strace shows me that it happens directly after some font providing
> courier is beeing accessed, eg.
> /usr/share/fonts/truetype/ms/coue1257.fon
> Even if I remove one of the courier providers, it crashes on another
> one.

When an application asks for a specific family (Courier), fontconfig
always provides a font from that family if any exist. This lets
applications be sure that they'll get the fonts they ask for if such fonts
are on the system.

In your case, fontconfig manages to find some stale old Windows bitmap
version of courier (coue1257.fon) which apparantly breaks applications
badly.

With fontconfig 2.2.3, disabling bitmap fonts only skipped the X11 bitmaps
in /usr/X11R6/lib/X11/... Fontconfig 2.3.1 skips all bitmap font files by
type, so selecting the 'no bitmaps' option with version 2.3.1-1 should
solve your problem.

Let me know if this isn't fixed by the new version.

-keith

--==_Exmh_-653335348P
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Exmh version 2.3.1 11/28/2001

iD8DBQFCL7Q6Qp8BWwlsTdMRAiLfAKDDeqUQcjP8GxmHyv5GHxuADKGO6gCgurMv
2ysnhwz49rp71u+EO9/gZ6w=
=GOf0
-----END PGP SIGNATURE-----

--==_Exmh_-653335348P--

Revision history for this message
Matthew Carpenter (matt-eisgr) wrote :

Courier is still invisible yet even today, on all my Kubuntu boxen. Is this
going to be fixed?

Revision history for this message
Matt Zimmerman (mdz) wrote :

What version of fontconfig are you using? Keith claims it is fixed in 2.2.3+,
which is available in Hoary and later. if it isn't fixed for you, you should
definitely contact him.

Revision history for this message
Matthew Carpenter (matt-eisgr) wrote :

Sorry, I didn't see your response.

matt@eolyn:~ $ dpkg -s fontconfig
Package: fontconfig
Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 236
Maintainer: Josselin Mouette <email address hidden>
Architecture: i386
Version: 2.2.3-4ubuntu7
Depends: libc6 (>= 2.3.2.ds1-4), libfontconfig1 (>= 2.2.1), debconf (>= 0.5) |
debconf-2.0, defoma (>= 0.7.0), ucf (>= 0.29), ttf-bitstream-vera | ttf-freefont
| gsfonts-x11 | msttcorefonts, laptop-detect
Conflicts: libfontconfig1-dev (<< 2.2.2-1)
Conffiles:

Revision history for this message
Matthew Carpenter (matt-eisgr) wrote :

Turns out that when I remove the imported Microsoft Courier-related fonts I can
view Courier just fine. (I also rm ~/.fonts.cache-1 in case that matters, but
it was 0-bytes).

Hope this helps.

Revision history for this message
Ian Jackson (ijackson) wrote :

I'm downgrading the severity of this bug because it seems that it was caused by
stale Microsoft fonts on the user's system. Programs should still not take
floating point exceptions, and it would be nice if they would warn about the
broken fonts or ignore them or something.

Revision history for this message
Erik Meitner (e-spambo1-meitner) wrote :

I had a similar problem with Firefox when viewing webpages that used a monospace
font - usually used when displaying code examples. I narrowed it down to web
pages that used CSS to set the font to "courier" for PRE,TT, or other tags. I
found that when firefox was set to "Use my fonts" the text would show up
properly, but this is not an option for me.
After reading this bug report I ran "dpkg-reconfigure
fontconfig"(2.2.3-4ubuntu7). It was already set to disable bitmapped fonts. I
ENABLED bitmap fonts, reopened Firefox, and the problem was fixed. I DISABLED
bitmapped fonts and restarted firefox and the text was again invisible.

On a hunch I removed wine(0.9.1-winehq-3) since it contained
'/usr/share/fonts/wine/coue1257.fon'. The page then renders properly in Firefox
with or without bitmapped fonts enabled. I re-installed that version of wine and
tested. The page with "font-family: courier;" CSS in it now renders the text
invisible only when bitmapped fonts are ENABLED.

Matt Zimmerman (mdz)
Changed in fontconfig:
assignee: nobody → mvo
Revision history for this message
Carthik Sharma (carthik) wrote :

Fixed in Debian.
Version 2.3.2-1.1ubuntu6 in Ubuntu fixes this. Closing, Thanks.

Changed in fontconfig:
status: Unconfirmed → Fix Released
Changed in fontconfig:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.