summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--chrome/app/resources/platform_locale_settings/locale_settings_cros_zh-CN.xtb19
-rw-r--r--chrome/app/resources/platform_locale_settings/locale_settings_cros_zh-TW.xtb18
-rw-r--r--skia/ext/SkFontHost_fontconfig_direct.cpp37
-rw-r--r--ui/base/strings/app_locale_settings_zh-CN.xtb2
-rw-r--r--ui/base/strings/app_locale_settings_zh-TW.xtb2
5 files changed, 52 insertions, 26 deletions
diff --git a/chrome/app/resources/platform_locale_settings/locale_settings_cros_zh-CN.xtb b/chrome/app/resources/platform_locale_settings/locale_settings_cros_zh-CN.xtb
index a47dfb2..8889280 100644
--- a/chrome/app/resources/platform_locale_settings/locale_settings_cros_zh-CN.xtb
+++ b/chrome/app/resources/platform_locale_settings/locale_settings_cros_zh-CN.xtb
@@ -1,12 +1,19 @@
<?xml version="1.0" ?>
<!DOCTYPE translationbundle>
<translationbundle lang="zh-CN">
-<!-- TODO(jungshik): remove this line once we fix bug 14691 -->
-<translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, Song ASC, sans-serif</translation>
-<translation id="IDS_STANDARD_FONT_FAMILY">Droid Sans Fallback</translation>
-<translation id="IDS_FIXED_FONT_FAMILY">N Song ASC</translation>
-<translation id="IDS_SERIF_FONT_FAMILY">Song ASC</translation>
-<translation id="IDS_SANS_SERIF_FONT_FAMILY">Droid Sans Fallback</translation>
+<if expr="pp_ifdef('_google_chrome')">
+ <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, MYingHeiGB18030, MYingHeiB5HK, sans-serif</translation>
+ <translation id="IDS_STANDARD_FONT_FAMILY">MYingHeiGB18030</translation>
+ <translation id="IDS_FIXED_FONT_FAMILY">N Song ASC</translation>
+ <translation id="IDS_SERIF_FONT_FAMILY">Song ASC</translation>
+ <translation id="IDS_SANS_SERIF_FONT_FAMILY">MYingHeiGB18030</translation>
+</if>
+<if expr="not pp_ifdef('_google_chrome')">
+ <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, Droid Sans Fallback, sans-serif</translation>
+ <translation id="IDS_STANDARD_FONT_FAMILY">Droid Sans Fallback</translation>
+ <translation id="IDS_FIXED_FONT_FAMILY">Droid Sans Fallback</translation>
+ <translation id="IDS_SANS_SERIF_FONT_FAMILY">Droid Sans Fallback</translation>
+</if>
<translation id="IDS_MINIMUM_FONT_SIZE">12</translation>
<translation id="IDS_MINIMUM_LOGICAL_FONT_SIZE">12</translation>
</translationbundle>
diff --git a/chrome/app/resources/platform_locale_settings/locale_settings_cros_zh-TW.xtb b/chrome/app/resources/platform_locale_settings/locale_settings_cros_zh-TW.xtb
index 668c814..1bd87e4 100644
--- a/chrome/app/resources/platform_locale_settings/locale_settings_cros_zh-TW.xtb
+++ b/chrome/app/resources/platform_locale_settings/locale_settings_cros_zh-TW.xtb
@@ -1,11 +1,19 @@
<?xml version="1.0" ?>
<!DOCTYPE translationbundle>
<translationbundle lang="zh-TW">
-<translation id="IDS_STANDARD_FONT_FAMILY">Droid Sans Fallback</translation>
-<translation id="IDS_FIXED_FONT_FAMILY">MingLiU</translation>
-<!-- PMingLiU looks really bad. For now, use Song ASC (Simplified Chinese). -->
-<translation id="IDS_SERIF_FONT_FAMILY">Song ASC</translation>
-<translation id="IDS_SANS_SERIF_FONT_FAMILY">Droid Sans Fallback</translation>
+<if expr="pp_ifdef('_google_chrome')">
+ <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, MYingHeiB5HK, MYingHeiGB18030, sans-serif</translation>
+ <translation id="IDS_STANDARD_FONT_FAMILY">MYingHeiB5HK</translation>
+ <translation id="IDS_FIXED_FONT_FAMILY">MYingHeiB5HK</translation>
+ <translation id="IDS_SERIF_FONT_FAMILY">PMingLiU</translation>
+ <translation id="IDS_SANS_SERIF_FONT_FAMILY">MYingHeiB5HK</translation>
+</if>
+<if expr="not pp_ifdef('_google_chrome')">
+ <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, Droid Sans Fallback, sans-serif</translation>
+ <translation id="IDS_STANDARD_FONT_FAMILY">Droid Sans Fallback</translation>
+ <translation id="IDS_FIXED_FONT_FAMILY">Droid Sans Fallback</translation>
+ <translation id="IDS_SANS_SERIF_FONT_FAMILY">Droid Sans Fallback</translation>
+</if>
<translation id="IDS_MINIMUM_FONT_SIZE">12</translation>
<translation id="IDS_MINIMUM_LOGICAL_FONT_SIZE">12</translation>
</translationbundle>
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 =
diff --git a/ui/base/strings/app_locale_settings_zh-CN.xtb b/ui/base/strings/app_locale_settings_zh-CN.xtb
index 93a52a7..3db754e 100644
--- a/ui/base/strings/app_locale_settings_zh-CN.xtb
+++ b/ui/base/strings/app_locale_settings_zh-CN.xtb
@@ -2,5 +2,5 @@
<!DOCTYPE translationbundle>
<translationbundle lang="zh-CN">
<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation>
-<translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI,Song ASC,Droid Sans Fallback,sans-serif, 13px</translation>
+<translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI,MYingHeiGB18030,MYingHeiB5HK,Droid Sans Fallback,sans-serif, 13px</translation>
</translationbundle>
diff --git a/ui/base/strings/app_locale_settings_zh-TW.xtb b/ui/base/strings/app_locale_settings_zh-TW.xtb
index 275c7d0..a44eabd 100644
--- a/ui/base/strings/app_locale_settings_zh-TW.xtb
+++ b/ui/base/strings/app_locale_settings_zh-TW.xtb
@@ -2,5 +2,5 @@
<!DOCTYPE translationbundle>
<translationbundle lang="zh-TW">
<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation>
-<translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI,Song ASC,Droid Sans Fallback,sans-serif, 13px</translation>
+<translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI,MYingHeiB5HK,MYingHeiGB18030,Droid Sans Fallback,sans-serif, 13px</translation>
</translationbundle>