[Fontconfig] family substitution

Nicolai Stange nicolai.stange at zmaw.de
Sat Apr 24 08:21:34 PDT 2010


Hi all,

I recently compiled fontconfig 2.8.0 for Solaris10 (to give our users
access to the newest gtk and packages that depend on it, e.g. firefox).
Everything seems to work except my configuration:

$ fc-match serif
Serif12.pcf.Z: "Serif" "Serif"

Which looks very ugly.
$ fc-match sans-serif
Vera.ttf: "Bitstream Vera Sans" "Roman"

This looks very good. So, clever as I am, I tried this in
etc/fonts/conf.d/00-serif2bitstream.conf:
<match target="pattern" name="family">
        <test qual="any" name="family">
                <string>serif</string>
        </test>
        <edit name="familiy" mode="assign" binding="strong">
                <string>Bitstream Vera Serif</string>
        </edit> 
</match>

Unfortunately fontconfig does not acknowledge my cleverness:

$ FC_DEBUG=1 /sw/solaris10/gtk+-2.18.7/bin/fc-match serif
FC_DEBUG=1
FC_DEBUG=1
Match Pattern has 18 elts (size 32)
        family: "Bitstream Vera Serif"(w) "DejaVu Serif"(w) "Times New
Roman"(w) "Thorndale AMT"(w) "Luxi Serif"(w) "Nimbus Roman No9 L"(w)
"Times"(w) "Artsounk"(w) "BPG UTF8 M"(w) "Kinnari"(w) "Norasi"(w) "Frank
Ruehl"(w) "Dror"(w) "JG LaoTimes"(w) "Saysettha Unicode"(w)
"Pigiarniq"(w) "B Davat"(w) "B Compset"(w) "Kacst-Qr"(w) "Urdu Nastaliq
Unicode"(w) "Raghindi"(w) "Mukti Narrow"(w) "malayalam"(w) "Sampige"(w)
"padmaa"(w) "Hapax Berbère"(w) "MS Gothic"(w) "UmePlus P Gothic"(w)
"SimSun"(w) "PMingLiu"(w) "WenQuanYi Zen Hei"(w) "WenQuanYi Bitmap
Song"(w) "AR PL ShanHeiSun Uni"(w) "AR PL New Sung"(w) "ZYSong18030"(w)
"HanyiSong"(w) "MgOpen Canonica"(w) "Sazanami Mincho"(w)
"IPAMonaMincho"(w) "IPAMincho"(w) "Kochi Mincho"(w) "AR PL SungtiL
GB"(w) "AR PL Mingti2L Big5"(w) "AR PL Zenkai Uni"(w) "MS 明朝"(w)
"ZYSong18030"(w) "UnBatang"(w) "Baekmuk Batang"(w) "KacstQura"(w) "Frank
Ruehl CLM"(w) "Lohit Bengali"(w) "Lohit Gujarati"(w) "Lohit Hindi"(w)
"Lohit Marathi"(w) "Lohit Maithili"(w) "Lohit Kashmiri"(w) "Lohit
Konkani"(w) "Lohit Nepali"(w) "Lohit Sindhi"(w) "Lohit Punjabi"(w)
"Lohit Tamil"(w) "Meera"(w) "Lohit Malayalam"(w) "Lohit Kannada"(w)
"Lohit Telugu"(w) "Lohit Oriya"(w) "LKLUG"(w) "FreeSerif"(w)
"Code2000"(w) "Code2001"(w) "serif"(s) "Nazli"(w) "Lotoos"(w) "Mitra"(w)
"Ferdosi"(w) "Badr"(w) "Zar"(w) "Bitstream Vera Serif"(w)
        slant: 0(i)(s)
        weight: 100(i)(s)
        width: 100(i)(s)
        size: 12(f)(s)
        pixelsize: 12.5(f)(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-US"(s)
        fontversion: 2147483647(i)(s)
        embeddedbitmap: FcTrue(s)
        decorative: FcFalse(s)
        familiy: "Bitstream Vera Serif"(s)

Best score 0 0 71 1001 1001 0 501 0 1 1 1 1 0 0 0 2.14748e+12
Pattern has 18 elts (size 18)
        family: "Serif"(w)
        style: "Serif"(w)
        slant: 0(i)(w)
        weight: 100(i)(w)
        width: 100(i)(w)
        pixelsize: 12(f)(w)
        spacing: 100(i)(w)
        foundry: "Sun"(w)
        antialias: FcFalse(w)
        file: "/usr/openwin/lib/X11/fonts/misc/Serif12.pcf.Z"(w)
        index: 0(i)(w)
        outline: FcFalse(w)
        scalable: FcFalse(w)
        charset: 
        0000: 00000000 ffffffff ffffffff 7fffffff 00000000 ffffffff
ffffffff ffffffff
(w)
        lang: aa|ast|ay|bi|br|ch|da|de|en|es|eu|fj|fo|fur|fy|gd|gl|gv|
ho|ia|id|ie|io|is|it|lb|mg|nb|nds|nl|nn|no|nr|oc|om|pt|rm|sma|smj|so|sq|
ss|st|sv|sw|tl|ts|uz|vo|wa|xh|yap|zu|an|fil|ht|jv|kj|kwm|li|ms|ng|
pap-an|pap-aw|rn|rw|sc|sg|sn|su|za(w)
        fontversion: 0(i)(w)
        fontformat: "PCF"(w)
        decorative: FcFalse(w)

Serif12.pcf.Z: "Serif" "Serif"

Hmpf.
Any ideas? I've put the content of /etc/fonts here:
ftp://ftp.zmaw.de/outgoing/stange/etc_fonts.tar.gz

Thank you very much for your efforts!

Nicolai



More information about the Fontconfig mailing list