[Fontconfig] Font priority and locale settings
Eric Sagnes
eric.sagnes at gmail.com
Wed Aug 31 12:44:34 UTC 2016
Hi,
I noticed that `fc-match` result is influenced by locale settings.
For example with the following configuration snippet:
```
<alias>
<family>serif</family>
<prefer>
<family>DejaVu Serif</family>
<family>IPAPMincho</family>
<family>Baekmuk Batang</family>
</prefer>
</alias>
```
If the locale is `en_US.UTF8`, `DejaVu Serif` will be correctly matched as the default font:
```
$ LANG=en_US.UTF8 fc-match serif -s | head -n 5
DejaVuSerif.ttf: "DejaVu Serif" "Book"
DejaVuSerif-Bold.ttf: "DejaVu Serif" "Bold"
DejaVuSerif-Italic.ttf: "DejaVu Serif" "Italic"
DejaVuSerif-BoldItalic.ttf: "DejaVu Serif" "Bold Italic"
ipamp.ttf: "IPAPMincho" "Regular"
```
On the other hand, if the locale is set to `ja_JP.UTF8`, `IPAPMincho` font will be preferred over `DejaVu Serif`:
```
$ LANG=ja_JP.UTF8 fc-match serif -s | head -n 5
ipamp.ttf: "IPA P明朝" "Regular"
DejaVuSerif.ttf: "DejaVu Serif" "Book"
DejaVuSerif-Bold.ttf: "DejaVu Serif" "Bold"
DejaVuSerif-Italic.ttf: "DejaVu Serif" "Italic"
DejaVuSerif-BoldItalic.ttf: "DejaVu Serif" "Bold Italic"
```
Is this an expected behavior?
In this case, is there a way to have the preferred order respected unregarding of locale settings?
Cheers,
--
Eric Sagnes
サニエ エリック
More information about the Fontconfig
mailing list