Public bug reported:

it seems like there are quite a lot of bugs about fontconfig doing the
wrong thing.  here's one more.

when trying to match plain Courier (non-bold, non-oblique) with
additional constraint "spacing=0" you end up with Bold, Oblique Nimbus
Mono.

Here's

$ FC_DEBUG=1 fc-match Courier:spacing=0

on my hardy box:


Match Pattern has 18 elts (size 32)
        family: "Courier"(s) "Liberation Mono"(w) "Nimbus Mono L"(w) "Nimbus 
Mono L"(s) "NimbusMonL-Regu"(w) "Courier New"(w) "Liberation Mono"(w) 
"Cumberland AMT"(w) "Liberation Mono"(w) "Cumberland"(w) "Courier"(w) "DejaVu 
Sans Mono"(w) "Bitstream Vera Sans Mono"(w) "Andale Mono"(w) "Courier New"(w) 
"Cumberland AMT"(w) "Luxi Mono"(w) "Nimbus Mono L"(w) "Courier"(w) "AR PL UMing 
HK"(w) "AR PL UMing CN"(w) "Miriam Mono"(w) "VL Gothic"(w) "IPAMonaGothic"(w) 
"IPAGothic"(w) "Sazanami Gothic"(w) "Kochi Gothic"(w) "AR PL KaitiM GB"(w) "AR 
PL ShanHeiSun Uni"(w) "AR PL SungtiL GB"(w) "AR PL Mingti2L Big5"(w) 
"ZYSong18030"(w) "Baekmuk Dotum"(w) "Baekmuk Gulim"(w) "Lohit Bengali"(w) 
"Lohit Gujarati"(w) "Lohit Hindi"(w) "Lohit Punjabi"(w) "Lohit Tamil"(w) "Lohit 
Malayalam"(w) "Lohit Kannada"(w) "Lohit Telugu"(w) "Lohit Oriya"(w) "LKLUG"(w) 
"FreeMono"(w) "monospace"(w) "TlwgTypist"(w) "TlwgMono"(w) "Terafik"(w)
        slant: 0(i)(s)
        weight: 100(i)(s)
        width: 100(i)(s)
        size: 12(f)(s)
        pixelsize: 12.5(f)(s)
        spacing: 0(i)(s)
        hintstyle: 3(i)(s)
        hinting: FcTrue(s)
        verticallayout: FcFalse(s)
        autohint: FcFalse(s)
        globaladvance: FcTrue(s)
        dpi: 75(f)(s)
        scale: 1(f)(s)
        lang: "en-CA"(s)
        fontversion: 2147483647(i)(s)
        embeddedbitmap: FcTrue(s)
        decorative: FcFalse(s)

Best score 0 0 3 100 2 0 0 0 11000 10000 0 0 0 0 0 2.14748e+11Pattern has 15 
elts (size 15)
        family: "Nimbus Mono L"(w)
        style: "Bold Oblique"(w)
        slant: 110(i)(w)
        weight: 200(i)(w)
        width: 100(i)(w)
        foundry: "urw"(w)
        file: "/usr/share/fonts/type1/gsfonts/n022024l.pfb"(w)
        index: 0(i)(w)
        outline: FcTrue(w)
        scalable: FcTrue(w)
        charset: 0000: 00000000 ffffffff ffffffff 7fffffff 00000000 ffffdffe 
ffffffff ffffffff
        0001: ffffffff ffffffff fffff1ff ffffffff 00040000 00000000 00000000 
00000000
        0002: 03000000 00000000 00000000 00000000 00000000 00000000 3f0000c0 
00000000
        0004: ffffffff ffffffff ffffffff 00000000 0ccf0000 0ccff00c faff0007 
033ffffc
        0020: 77180000 06010047 00000010 00000000 00000000 00001000 00000000 
00000000
        0021: 00400000 00000004 00000000 00000000 00000000 00000000 00000000 
00000000
        0022: 44060044 00000000 00000000 00000031 00000000 00000000 00000000 
00000000
        0025: 00000000 00000000 00000000 00000000 00000000 00000000 00000400 
00000000
        00f6: 00000000 00000000 00000000 00000000 00000000 00000000 000001f8 
00000000
        00fb: 00000006 00000000 00000000 00000000 00000000 00000000 00000000 
00000000
(w)
        lang: 
aa|ast|ava|ay|be|bg|bi|br|bs|bua|ca|ce|ch|co|cs|da|de|en|eo|es|et|eu|fi|fj|fo|fr|fur|fy|gd|gl|gv|ho|hr|hu|ia|id|ie|ik|io|is|it|ki|kl|kum|kv|ky|la|lb|lez|lt|lv|mg|mh|mk|mt|nb|nds|nl|nn|no|nr|nso|ny|oc|om|os|pl|pt|rm|ru|sel|sh|sk|sl|sma|smj|so|sq|sr|ss|st|sv|sw|tg|tn|tr|ts|tyv|uk|uz|vo|vot|wa|wen|xh|yap|zu(w)
        fontversion: 0(i)(w)
        fontformat: "Type 1"(w)
        decorative: FcFalse(w)

n022024l.pfb: "Nimbus Mono L" "Bold Oblique"


Without specifying "spacing=0" I get the expected output (or at least an 
acceptable one: "Nimbus regular", although I would prefer one of the fonts I 
explicitly installed from liberation or the courier from msttcorefonts).

So why do I care about "spacing=0"?  This is what poppler requests when
you open the attached PDF file using evince.  The PDF includes no font
information since "Courier" is one of the PDF base fonts.  fontconfig
gives evince the bold/oblique font which results in incorrect output.

** Affects: fontconfig (Ubuntu)
     Importance: Undecided
         Status: New

-- 
fc-match Courier:spacing=0 ⇒ n022024l.pfb: "Nimbus Mono L" "Bold Oblique"
https://bugs.launchpad.net/bugs/268812
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to