Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 282151 - fontconfig bad font matching NewCenturySchlbk
Summary: fontconfig bad font matching NewCenturySchlbk
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Fonts Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-20 22:37 UTC by Carl Michal
Modified: 2010-04-27 18:32 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pdf file showing the problem (out1.pdf,81.59 KB, application/pdf)
2009-10-13 17:13 UTC, Carl Michal
Details
Generated PDF showing the problem (x.pdf,14.49 KB, application/octet-stream)
2010-04-27 18:32 UTC, Tassilo Horn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Michal 2009-08-20 22:37:38 UTC
I have a number of pdf documents (produced by journals from the American Chemical Society) that use New Century Schoolbook fonts.

Evince renders these documents horribly.

Both acroread and evince list the fonts in question as:
NewCenturySchlbk-Roman
NewCenturySchlbk-Bold
NewCenturySchlbk-Italic

evince uses verdana fonts rather than New Century Schoolbook fonts (which do exist on the system!)


acroread renders these documents just fine, and so does ghostscript.
gs -V shows:
Loading CenturySchL-Roma font from /usr/share/fonts/default/ghostscript/c059013l.pfb... 3317008 1865456 11559568 10235107 3 done.
Loading CenturySchL-Bold font from /usr/share/fonts/default/ghostscript/c059016l.pfb... 3377608 2035540 11579752 10269958 3 done.
Loading CenturySchL-Ital font from /usr/share/fonts/default/ghostscript/c059033l.pfb... 3578136 2227759 11302704 9231205 3 done.


Reproducible: Always
Comment 1 Timo Gurr (RETIRED) gentoo-dev 2009-08-21 09:53:45 UTC
Please don't assign bugs if you're not absolutely sure you've picked the right herd, see metadata.xml.
Comment 2 Carl Michal 2009-08-21 19:30:58 UTC
Sorry about the incorrect assignment.

I've looked into this problem a little further.
It looks as though the problem is fontconfig configuration.  It appears that by default fontconfig is not set up with appropriate aliases for some of the standard postscript fonts.  On poppler's wikipage here:

http://www.freedesktop.org/wiki/Software/poppler

they suggest adding aliases for a couple of fonts.  But on my system more of the standard 35 postscript fonts than are listed there aren't mapped properly.

Could I suggest adding the following as 
/etc/fonts/conf.d/31-urw-postscript-aliases.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias binding="same">
          <family>NewCenturySchlbk</family>
          <accept><family>Century Schoolbook L</family></accept>
        </alias>
<alias binding="same">
          <family>AvantGarde</family>
          <accept><family>URW Gothic L</family></accept>
        </alias>
<alias binding="same">
          <family>Symbol</family>
          <accept><family>Standard Symbols L</family></accept>
        </alias>
<alias binding="same">
          <family>ZapfDingbats</family>
          <accept><family>Dingbats</family></accept>
        </alias>
<alias binding="same">
          <family>ZapfChancery</family>
          <accept><family>URW Chancery L</family></accept>
        </alias>
</fontconfig>
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2009-10-13 11:25:34 UTC
Carl, could you attach some pdf for example? Probably you are right, but I need to do more inverstigation.

Any way if this is really necessary we need to develop substitutions for all 35 Postscript Level2 base fonts: http://techbase.kde.org/Projects/KDEPrint/Fonts/PostScript-Fonts%2BGhostscript

Also we need to find fonts with similar metric... but probably it's possible.
Comment 4 Carl Michal 2009-10-13 17:13:37 UTC
Created attachment 206989 [details]
pdf file showing the problem

Here is one page from a journal article that renders horribly in evince unless an alias is added for New Century Schoolbook. 

Is this as hard as you think?  Ghostscript appears able to render all the standard postscript fonts acceptably.  Are we not just missing some aliases...
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2010-04-11 01:56:10 UTC
you may be interested in http://permalink.gmane.org/gmane.comp.fonts.fontconfig/3430
Comment 6 Tassilo Horn 2010-04-27 18:23:04 UTC
I also suffer from a fontconfig configuration issue.  When I generate PDF files using GraphViz' dot program, the resulting fonts in the PDF are ugly.  I tracked it down to the fact that fontconfig chooses a bitmap font when Times is required.

% fc-match Times
imR12-ISO8859-1.pcf.gz: "Times" "Regular"

% locate timR12-ISO8859-1.pcf.gz 
/usr/share/fonts/75dpi/timR12-ISO8859-1.pcf.gz
/usr/share/fonts/100dpi/timR12-ISO8859-1.pcf.gz

They are owned by the packages media-fonts/font-adobe-100dpi-1.0.1 and
media-fonts/font-adobe-75dpi-1.0.1.

I've tried clearing and recreating the font cache with "fc-cache -frv",
but that makes no difference...

As a workaround, I can unmerge these font packages, but xorg-server depends on them, so this is no real solution.

(Bug 264425, or better my comments there, is slightly related.)
Comment 7 Tassilo Horn 2010-04-27 18:32:03 UTC
Created attachment 229435 [details]
Generated PDF showing the problem

Generated using the command

  dot -Tpdf -o x.pdf x.dot

where x.dot has the following contents:

digraph "1eee3474-882d4db6-e0dfcf69-e230ca5d"
{
  ranksep="0.5";
  nodesep="0.25";
  node [shape="record" fontname="Helvetica" fontsize="14" color="#999999"];
  edge [fontname="Helvetica" fontsize="14" labelfontname="Helvetica" labelfontsize="14" color="#999999"];
  v1 [label="{{v1|ActivityGraph}|name = \"graph\"\l}"];
  v2 [label="{{v2|CompositeState}|name = \"top\"\l}"];
  v3 [label="{{v3|Pseudostate}|kind = initial\lname = \"pk_initial1\"\l}"];
  v4 [label="{{v4|ActionState}|isDynamic = false\lname = \"Request Service\"\l}"];
  v1 -> v2 [dir="both" arrowtail="diamond" label="e1: HasTop"];
  v2 -> v3 [dir="both" arrowtail="diamond" label="e2: ContainsSubState"];
  v2 -> v4 [dir="both" arrowtail="diamond" label="e3: ContainsSubState"];
}