Bug 478332 - Nimbus Mono L Bold Oblique is not really monospace
Summary: Nimbus Mono L Bold Oblique is not really monospace
Alias: None
Product: Fedora
Classification: Fedora
Component: urw-fonts
Version: 11
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-12-28 10:58 UTC by Behdad Esfahbod
Modified: 2010-06-28 11:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-06-28 11:02:34 UTC
Type: ---

Attachments (Terms of Use)

Description Behdad Esfahbod 2008-12-28 10:58:42 UTC
Apparently glyph 227 (or maybe 226 according to fontforge) of /usr/share/fonts/default/Type1/n022024l.pfb has a width of 740 while all the other glyphs in the font have width 600.  This causes fontconfig to mark the font as proportional instead of monospace.  That then is causing other issues:


Comment 1 James Cloos 2008-12-28 16:20:28 UTC
It is actually worse than that:

:; awk '/WX/ {print $4 " " $5}' urw-fonts/n022024l.afm|sort|uniq -c
    544 WX 747
    116 WX 774

shows that two widths exist in the metrics in the afm file.

:; t1disasm urw-fonts/n022024l.pfb |awk '/hsbw/ {print $(NF-1)}'|sort|uniq -c
    544 579
    116 600
      1 775

confirms that info.  (The one char with width 775 in the font is /.notdef.)

And it is not just bold oblique.  Oblique shows:

:; t1disasm urw-fonts/n022023l.pfb |awk '/hsbw/ {print $(NF-1)}'|sort|uniq -c
      1 583
      1 592
    547 598
    111 600
      1 775

and bold shows:

:; t1disasm urw-fonts/n022004l.pfb |awk '/hsbw/ {print $(NF-1)}'|sort|uniq -c
    546 578
    114 600
      1 775

Only the base face gets it right:

:; t1disasm urw-fonts/n022003l.pfb |awk '/hsbw/ {print $(NF-1)}'|sort|uniq -c
    661 600

(Courier is defined to have a width of 600 in 1000 unit/em space; that makes for a 2:1 aspect ratio when set 10/12.  Most other monowidth fonts match that width; CMTT is the most prevalent exception, given that it was designed for use in a narrow book page.)

The fix is best started with t1disasm, t1asm and one's choice of sed, awk, perl or a text editor.

In the t1disasm output, do:

  s/\d+ hsbw/600 hsbw/

then bump the font’s version and then use t1asm to convert that back to a pfb.

For the afm files, it is:

  s/ WX \d+ / WX 600 /

and a similar bump to the Version: line.  (Yes, the afm files for Nimbus Mono are completely screwed if it is supposed to be Courier-compatible.)

That might leave some glyphs uncentered.  If so, a bit of tweaking will be necesary.  A quick check, however, using ftview suggests that the above changes are enough.

Comment 2 James Cloos 2008-12-28 17:25:54 UTC
Oh.  I should add that I did not do the grep(1)ing on an rh or fedora box, so YMMV.

The version I looked at came from an rh srpm named urw-fonts-2.3-6.1.1.src.rpm which has a sig date of Mon May 21 14:21:05 2007, Key ID b44269d04f2a6fd2.

I don’t know how that compares with the version(s?) shipping in current rh or fedora releases.

The Nimbus Mono faces were version 1.06.

Comment 3 Behdad Esfahbod 2008-12-28 19:45:41 UTC
$ awk '/WX/ {print $4 " " $5}' /usr/share/fonts/default/Type1/n022024l.afm|sort|uniq -c
    518 WX 600
      1 WX 740

$ t1disasm /usr/share/fonts/default/Type1//n022024l.pfb |awk '/hsbw/ {print $(NF-1)}'|sort|uniq -c
      1 500
    520 600
      1 740

$ t1disasm /usr/share/fonts/default/Type1/n022023l.pfb |awk '/hsbw/ {print $(NF-1)}'|sort|uniq -c
    533 600

$ t1disasm /usr/share/fonts/default/Type1/n022004l.pfb |awk '/hsbw/ {print $(NF-1)}'|sort|uniq -c
    540 600

$ t1disasm /usr/share/fonts/default/Type1/n022003l.pfb |awk '/hsbw/ {print $(NF-1)}'|sort|uniq -c
    563 600

Comment 4 James Cloos 2008-12-28 20:25:02 UTC
What is the rpm version?

If it is newer than what I have here I need to post a bug for this dist about it....

Comment 5 Behdad Esfahbod 2008-12-28 21:17:25 UTC

Comment 6 James Cloos 2008-12-29 15:09:38 UTC

I grabbed that srpm.  The broken glyph in that version is /dcaron.

Testing it with the width set to 600 shows that the “caron”¹ will stick out a bit; the glyph shape may need to be adjusted as well.

Comment 7 Bug Zapper 2009-06-09 10:32:12 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:

Comment 8 Bug Zapper 2010-04-27 12:39:14 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Comment 9 Bug Zapper 2010-06-28 11:02:34 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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