Thursday, August 5, 2010

Bad Evince Font in Slackware

When I install evince on my Slackware, sometimes I encounter a strange problem which is the font is not display correctly or looks weird, as like the picture below:

You can see that there are fonts look too bold and inconvenient to read. After diving in google, I found that the problem comes from the Nimbus font in slackware package. To check and fix it you can follow instructions below:
  • Check fonts in pdf file
  • $ pdffonts file.pdf
    name                                 type      emb sub uni object ID
    ------------------------------------ --------- --- --- --- ---------
    Times-Italic                         Type 1    no  no  no       5  0
    Times-Roman                          Type 1    no  no  no       7  0
    Times-Bold                           Type 1    no  no  no      13  0
    Courier-Bold                         Type 1    no  no  no      18  0
    XOEOHB+CMSY10                        Type 1    yes yes no      21  0
    Courier                              Type 1    no  no  no      23  0
    RXRCVR+CMSY7                         Type 1    yes yes no      26  0
    CRMLEZ+NimbusRomNo9L-Regu-Slant_167  Type 1    yes yes no      32  0
  • Check"Times" compatible font
  • $ fc-match "times"
    n021004l.pfb: "Nimbus Roman No9 L" "Medium"
  • Find n021004l.pfb location
  • $ su
    # find / -name "n021004l.pfb" -print
  • Download new n021004l.pfb
  • As I get from searching in google, the problem is n021004l.pfb in Slackware package is not updated yet, so we need to replace it with the new one. In this case I'll replace it with the Fedora 13 URW fonts package. You can download the package from
  • Extract the rpm package
  • # rpm2cpio urw-fonts-2.4-9.fc13.noarch.rpm | cpio -idmv 
  • Copy fonts file and reboot
  • # cd usr/share/fonts/default/Type1
    # cp n021004l.pfb /usr/share/fonts/Type1/n021004l.pfb
    # reboot 

After reboot then I check evince display, and the result is like below. There we can see that the font looks better and convenient than before.

I hope this tutorial is helpful.


  1. I wasn't familiar with some of these commands. Very useful to know. Thanks.

  2. Thank you. I am so glad, it it becomes useful