[Fontconfig] How do I fc-match font of some particular encoding?

Raimund Steger rs at mytum.de
Mon Jan 19 14:20:23 PST 2015


On 01/19/15 20:20, Yuri Kanivetsky wrote:
> Hi,
>
> I was trying to make xterm use some particular font, namely Terminus. I
> managed to do so with "font" X resource:
>
>      xterm*font: -*-terminus-medium-r-*--20-*-*-*-*-*-iso10646-*
>
> But I wonder if I could achieve the same result with "faceName"
> resource. I tried it this way (according to tutorial at
> http://keithp.com/~keithp/render/Xft.tutorial):
>
>      xterm*faceName: Terminus:encoding=iso10646-1

I don't think the 'encoding' property was ever supported by fontconfig. 
Even on my system, it's commented as "old" in 
/usr/include/X11/Xft/XftCompat.h and doesn't have a fontconfig 
equivalent in that file.

If you need fontconfig to choose a font that supports a certain glyph, 
best use the 'lang' property which fontconfig uses to indicate glyph 
coverage.

I. e. use some 'lang' value that doesn't appear in the ISO-8859-1 
version of the font.

   fc-match Terminus:lang=ru

With newer fontconfig, you should also be able to match on 'file'.

Raimund


More information about the Fontconfig mailing list