summaryrefslogtreecommitdiffstats
path: root/skia
diff options
context:
space:
mode:
authorjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 19:09:46 +0000
committerjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 19:09:46 +0000
commitfa6d077f9968ac04c7da3c555958f09a645f6602 (patch)
tree6399a25a260894930ab07e994ab6d29ede2f34dc /skia
parent7c907525c2816ef7936a38f16aefeed192479ee1 (diff)
downloadchromium_src-fa6d077f9968ac04c7da3c555958f09a645f6602.zip
chromium_src-fa6d077f9968ac04c7da3c555958f09a645f6602.tar.gz
chromium_src-fa6d077f9968ac04c7da3c555958f09a645f6602.tar.bz2
Chrome-side change to add two Chinese fonts (licensed).
There are two other CLs on the Chrome-OS side. One is at https://gerrit.chromium.org/gerrit/#/c/36597/ and the other is internal. BUG=126735 TEST=Start ChromeOS in zh-CN or zh-TW and make sure that the UI font is sans-serif. Review URL: https://codereview.chromium.org/11029040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165458 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r--skia/ext/SkFontHost_fontconfig_direct.cpp37
1 files changed, 24 insertions, 13 deletions
diff --git a/skia/ext/SkFontHost_fontconfig_direct.cpp b/skia/ext/SkFontHost_fontconfig_direct.cpp
index 7ba5ca5..fd0e243 100644
--- a/skia/ext/SkFontHost_fontconfig_direct.cpp
+++ b/skia/ext/SkFontHost_fontconfig_direct.cpp
@@ -36,12 +36,14 @@ enum FontEquivClass
SANS,
SERIF,
MONO,
- PMINCHO,
- MINCHO,
+ SYMBOL,
PGOTHIC,
GOTHIC,
+ PMINCHO,
+ MINCHO,
SIMSUN,
NSIMSUN,
+ SIMHEI,
};
// Match the font name against a whilelist of fonts, returning the equivalence
@@ -83,6 +85,9 @@ FontEquivClass GetFontEquivClass(const char* fontname)
{ MONO, "Cousine" },
{ MONO, "Liberation Mono" },
+ { SYMBOL, "Symbol" },
+ { SYMBOL, "Symbol Neu" },
+
// MS Pゴシック
{ PGOTHIC, "MS PGothic" },
{ PGOTHIC, "\xef\xbc\xad\xef\xbc\xb3 \xef\xbc\xb0"
@@ -90,10 +95,12 @@ FontEquivClass GetFontEquivClass(const char* fontname)
{ PGOTHIC, "IPAPGothic" },
{ PGOTHIC, "MotoyaG04Gothic" },
- // 宋体
- { SIMSUN, "Simsun" },
- { SIMSUN, "\xe5\xae\x8b\xe4\xbd\x93" },
- { SIMSUN, "Song ASC" },
+ // MS ゴシック
+ { GOTHIC, "MS Gothic" },
+ { GOTHIC, "\xef\xbc\xad\xef\xbc\xb3 "
+ "\xe3\x82\xb4\xe3\x82\xb7\xe3\x83\x83\xe3\x82\xaf" },
+ { GOTHIC, "IPAGothic" },
+ { GOTHIC, "MotoyaG04GothicMono" },
// MS P明朝
{ PMINCHO, "MS PMincho" },
@@ -102,23 +109,27 @@ FontEquivClass GetFontEquivClass(const char* fontname)
{ PMINCHO, "IPAPMincho" },
{ PMINCHO, "MotoyaG04Mincho" },
- // MS ゴシック
- { GOTHIC, "MS Gothic" },
- { GOTHIC, "\xef\xbc\xad\xef\xbc\xb3 "
- "\xe3\x82\xb4\xe3\x82\xb7\xe3\x83\x83\xe3\x82\xaf" },
- { GOTHIC, "IPAGothic" },
- { GOTHIC, "MotoyaG04GothicMono" },
-
// MS 明朝
{ MINCHO, "MS Mincho" },
{ MINCHO, "\xef\xbc\xad\xef\xbc\xb3 \xe6\x98\x8e\xe6\x9c\x9d" },
{ MINCHO, "IPAMincho" },
{ MINCHO, "MotoyaG04MinchoMono" },
+ // 宋体
+ { SIMSUN, "Simsun" },
+ { SIMSUN, "\xe5\xae\x8b\xe4\xbd\x93" },
+ { SIMSUN, "Song ASC" },
+
// 新宋体
{ NSIMSUN, "NSimsun" },
{ NSIMSUN, "\xe6\x96\xb0\xe5\xae\x8b\xe4\xbd\x93" },
{ NSIMSUN, "N Song ASC" },
+
+ // 黑体
+ { SIMHEI, "Simhei" },
+ { SIMHEI, "\xe9\xbb\x91\xe4\xbd\x93" },
+ { SIMHEI, "MYingHeiGB18030" },
+ { SIMHEI, "MYingHeiB5HK" },
};
static const size_t kFontCount =