Re: Font priority and locale settings

Akira TAGOH <[email protected]>
Newsgroups gmane.comp.fonts.fontconfig
Message-ID <CACT-Cx2Dyn9K+_KEMiiH-mo4UX0BR5wro2w3f4WPSFqm0his6Q@mail.gmail.com>
Yes, it is the expected behavior. the locale settings affects to FC_LANG
property. you have two options to change this:

1) add a lang property to query. which is most common way and most
applications does.
    e.g. fc-match serif:lang=en

2) if you don't like 1) because it still affects the order of the whole
list say, set FC_LANG env var to change the default language regardless of
current locale.
    e.g. FC_LANG=en fc-match serif


On Wed, Aug 31, 2016 at 9:44 PM, Eric Sagnes <[email protected]> wrote:

> 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
> サニエ エリック
> _______________________________________________
> Fontconfig mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/fontconfig
>



-- 
Akira TAGOH

_______________________________________________
Fontconfig mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/fontconfig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.