如何 fc 匹配某些特定编码的字体?

如何 fc 匹配某些特定编码的字体?

我很难设置要xterm使用的字体。我设法用资源做到了这一点font

xterm*font: -*-terminus-medium-r-*--20-*-*-*-*-*-iso10646-*

但我想知道资源对应的价值是多少faceName?当我指定它时像这样:

xterm*faceName: Terminus:encoding=iso10646-1

它选择ter-112n.pcf.gz( -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso8859-1) 字体fc-match。令人惊讶的是,fc-pattern说道:

$ fc-pattern Terminus:encoding=iso10646-1
Pattern has 2 elts (size 16)
        family: "Terminus"(s)
        encoding: <unknown>(s)

不知道这意味着什么。fc-query对于文件我希望它使用输出:

$ fc-query /usr/share/fonts/misc/ter-x20n.pcf.gz
Pattern has 20 elts (size 32)
        family: "Terminus"(s)
        style: "Regular"(s)
        slant: 0(i)(s)
        weight: 80(i)(s)
        width: 100(i)(s)
        pixelsize: 20(f)(s)
        spacing: 110(i)(s)
        foundry: "xos4"(s)
        antialias: False(s)
        file: "/usr/share/fonts/misc/ter-x20n.pcf.gz"(s)
        index: 0(i)(s)
        outline: False(s)
        scalable: False(s)
        charset: 
        0000: ffffffff ffffffff ffffffff 7fffffff 00000000 ffffffff ffffffff ffffffff
        0001: ffffffff ffffffff ffffffff ff3fffff 6005c040 00800000 00000000 00000000
        0002: 0f000000 008c0000 0b100000 00040000 00040000 38000000 3b0000c0 00000000
        0003: 0000104f 00000200 00000000 00000000 ffffd7f0 fffffffb 00007fff 00180000
        0004: ffffffff ffffffff ffffffff 00000000 3fff0000 0fcfcc3f ffff0000 033ffffc
        001e: 00000000 00300000 00000000 00000000 00000000 33000000 00003c00 03000030
        0020: ffff07ff 560d0047 00000000 80000000 00000000 00005080 00000000 00000000
        0021: 0040c000 00000044 00000000 00000000 003f0000 00200100 003f0000 00000000
        0022: c6040568 00000780 00000100 00000033 00000000 00000000 00000000 00000000
        0023: 00010005 00000003 00000000 00000000 00000000 3c000000 00000000 00000000
        0024: 00003e00 00000010 00000000 00000000 00000000 00000000 00000000 00000000
        0025: ffffff0f ffffffff ffff0fff fff1ffff ffcfffff 10445001 03008c41 00000000
        0026: 00000000 1c000000 00000005 00000c69 00000000 00000000 00000000 00000000
        0027: 01980000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
        00e0: 00000000 00000000 00000000 00000000 00000000 000f0007 00000000 00000000
        00f6: 00000000 00000000 00000000 00000000 00000000 40000000 00000000 00000000
        00ff: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 20000000
(s)
        lang: aa|af|av|ay|az-az|ba|bm|be|bg|bi|bin|br|bs|bua|ca|ce|ch|chm|co|cs|cv|da|de|el|en|eo|es|et|eu|fi|fj|fo|fr|fur|fy|gd|gl|gn|gv|haw|ho|hr|hu|ia|ig|id|ie|ik|io|is|it|kaa|ki|kk|kl|kum|kv|kw|ky|la|lb|lez|ln|lt|lv|mg|mh|mi|mk|mo|mt|nb|nds|nl|nn|no|nr|nso|ny|oc|om|os|pl|pt|rm|ro|ru|sah|se|sel|sh|sk|sl|sm|sma|smj|smn|so|sq|sr|ss|st|sv|sw|tg|tk|tl|tn|to|tr|ts|tt|tw|tyv|uk|uz|vo|vot|wa|wen|wo|xh|yap|zu|ak|an|crh|csb|fat|fil|hsb|ht|jv|kj|ku-tr|kwm|lg|li|mn-mn|ms|na|ng|pap-an|pap-aw|rn|rw|sc|sg|sn|su|ty|za(s)
        fontversion: 0(i)(s)
        fontformat: "PCF"(s)
        decorative: False(s)
        hash: "sha256:5b0df9eaed92cca3d962b4aa612614718bfdbbafcc4b42240a28bf3faa3c80bd"(s)
        postscriptname: "Terminus"(s)

这是否意味着我无法通过编码来匹配该字体?

答案1

按照这个回应encoding财产被认为是旧的。可以使用lang

fc-match Terminus:lang=ru

file属性:

fc-match Terminus:file=/usr/share/fonts/misc/ter-x20n.pcf.gz

相关内容