aboutsummaryrefslogtreecommitdiff
path: root/fontconfig
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-22 08:30:33 +0200
committermarha <marha@users.sourceforge.net>2012-06-22 08:30:33 +0200
commite1a407256a5c1571d8f4871fd981a51cfbd46e37 (patch)
tree9f8327deb05890b77137d57c0416d392beaa7fac /fontconfig
parentda6ea6d64418710cbf7e0639dfefd2d856d53f1a (diff)
downloadvcxsrv-e1a407256a5c1571d8f4871fd981a51cfbd46e37.tar.gz
vcxsrv-e1a407256a5c1571d8f4871fd981a51cfbd46e37.tar.bz2
vcxsrv-e1a407256a5c1571d8f4871fd981a51cfbd46e37.zip
mesa xserver libxcb fontconfig
Diffstat (limited to 'fontconfig')
-rw-r--r--fontconfig/doc/fontconfig-user.sgml35
-rw-r--r--fontconfig/src/fcxml.c16
2 files changed, 48 insertions, 3 deletions
diff --git a/fontconfig/doc/fontconfig-user.sgml b/fontconfig/doc/fontconfig-user.sgml
index 92d0db8bf..f7632ea67 100644
--- a/fontconfig/doc/fontconfig-user.sgml
+++ b/fontconfig/doc/fontconfig-user.sgml
@@ -677,6 +677,41 @@ $XDG_CONFIG_HOME/fontconfig/fonts.conf
&lt;match target="font"&gt;
&lt;edit name="rgba" mode="assign"&gt;&lt;const&gt;rgb&lt;/const&gt;&lt;/edit&gt;
&lt;/match&gt;
+&lt;!--
+ use WenQuanYi Zen Hei font when serif is requested for Chinese
+--&gt;
+&lt;match&gt;
+ &lt;!--
+ If you don't want to use WenQuanYi Zen Hei font for zh-tw etc,
+ you can use zh-cn instead of zh.
+ Please note, even if you set zh-cn, it still matches zh.
+ if you don't like it, you can use compare="eq"
+ instead of compare="contains".
+ --&gt;
+ &lt;test name="lang" compare="contains"&gt;
+ &lt;string&gt;zh&lt;/string&gt;
+ &lt;/test&gt;
+ &lt;test name="family"&gt;
+ &lt;string&gt;serif&lt;/string&gt;
+ &lt;/test&gt;
+ &lt;edit name="family" mode="prepend"&gt;
+ &lt;string&gt;WenQuanYi Zen Hei&lt;/string&gt;
+ &lt;/edit&gt;
+&lt;/match&gt;
+&lt;!--
+ use VL Gothic font when sans-serif is requested for Japanese
+--&gt;
+&lt;match&gt;
+ &lt;test name="lang" compare="contains"&gt;
+ &lt;string&gt;ja&lt;/string&gt;
+ &lt;/test&gt;
+ &lt;test name="family"&gt;
+ &lt;string&gt;sans-serif&lt;/string&gt;
+ &lt;/test&gt;
+ &lt;edit name="family" mode="prepend"&gt;
+ &lt;string&gt;VL Gothic&lt;/string&gt;
+ &lt;/edit&gt;
+&lt;/match&gt;
&lt;/fontconfig&gt;
</programlisting>
</refsect2>
diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c
index b8e4469a3..a14606821 100644
--- a/fontconfig/src/fcxml.c
+++ b/fontconfig/src/fcxml.c
@@ -2042,6 +2042,7 @@ FcParseInclude (FcConfigParse *parse)
FcChar8 *s;
const FcChar8 *attr;
FcBool ignore_missing = FcFalse;
+ FcBool deprecated = FcFalse;
FcChar8 *prefix = NULL;
s = FcStrBufDoneStatic (&parse->pstack->str);
@@ -2053,6 +2054,9 @@ FcParseInclude (FcConfigParse *parse)
attr = FcConfigGetAttribute (parse, "ignore_missing");
if (attr && FcConfigLexBool (parse, (FcChar8 *) attr) == FcTrue)
ignore_missing = FcTrue;
+ attr = FcConfigGetAttribute (parse, "deprecated");
+ if (attr && FcConfigLexBool (parse, (FcChar8 *) attr) == FcTrue)
+ deprecated = FcTrue;
attr = FcConfigGetAttribute (parse, "prefix");
if (attr && FcStrCmp (attr, (const FcChar8 *)"xdg") == 0)
prefix = FcConfigXdgConfigHome ();
@@ -2078,9 +2082,15 @@ FcParseInclude (FcConfigParse *parse)
parse->error = FcTrue;
else
{
- attr = FcConfigGetAttribute (parse, "deprecated");
- if (attr && FcConfigLexBool (parse, (FcChar8 *) attr) == FcTrue)
- FcConfigMessage (parse, FcSevereWarning, "reading configurations from %s is deprecated.\n", s);
+ FcChar8 *filename;
+
+ filename = FcConfigFilename(s);
+ if ((deprecated == FcTrue) && filename)
+ {
+ FcConfigMessage (parse, FcSevereWarning, "reading configurations from %s is deprecated.", s);
+ }
+ if(filename)
+ FcStrFree(filename);
}
FcStrBufDestroy (&parse->pstack->str);