https://bugzilla.redhat.com/show_bug.cgi?id=1308856
Akira TAGOH <tagoh(a)redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |CLOSED
Resolution|--- |NOTABUG
Last Closed| |2016-02-22 03:47:39
--- Comment #29 from Akira TAGOH <tagoh(a)redhat.com> ---
fonts-tweek-tool is just an GUI to help users to configure fontconfig
configration. FC_LANG is an environment variable to give a priority to the
given language but the highest priority is still the language in the query.
let's see:
$ LANG=en_US.UTF-8 FC_LANG-zh-CN:zh-TW FC_DEBUG=4 fc-match
...
FcConfigSubstitute Pattern has 2 elts (size 16)
lang: "zh-cn"(w) "zh-tw"(w)
prgname: "fc-match"(s)
You can see FC_LANG can affects the query with the weak binding. and:
$ LANG=en_US.UTF-8 FC_LANG-zh-CN:zh-TW FC_DEBUG=4 fc-match
...
cConfigSubstitute Pattern has 2 elts (size 16)
lang: ja(s) "zh-cn"(w) "zh-tw"(w)
prgname: "fc-match"(s)
the languages in the FC_LANG is added after the original query.
(In reply to Ray Wang from comment #28)
For Chinese or other languages which the default system font
don't have that
character set, it will search and match the first available font which has
those characters.
Not exactly. it actually depends on the query. fontconfig computes the score to
select the best font.
3. In my case, when I type a Chinese character, it will find it if
default
font has it, otherwise, it will continue to find it from "Adobe Source Han
Sans CN" and then "Adobe Source Han Sans TW", since I set the
"Chinese
(P.R.China)" as the first language, I'm expecting the character will be pick
up from "Adobe Source Han Sans CN" rather than other font.
That is correct in Pango. but not necessarily correct for everything.
determining the fallback font is up to the library because the best font might
not be picked up by the first query. that's why setting LANG=zh_CN works but
not necessarily on LANG=en_US. and saying that it is an application bug.
Apparently there are some applications you want to see the correct behavior and
there are nothing to do in fonts-tweak-tool nor fontconfig. I'll close this so
far.
Please file another bug for the certain applications and back to (maybe)
fontconfig as needed.
--
You are receiving this mail because:
You are on the CC list for the bug.