diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-09 04:36:52 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-09 04:36:52 +0000 |
commit | c9e1715cfd9e925ece5f94a5028d5bb302765281 (patch) | |
tree | 2ab152b05f25f7e7d985f7fd9ab6b9a571bef0c4 /app | |
parent | ee70311954923a02bfeaa9e6a57e2614fef97464 (diff) | |
download | chromium_src-c9e1715cfd9e925ece5f94a5028d5bb302765281.zip chromium_src-c9e1715cfd9e925ece5f94a5028d5bb302765281.tar.gz chromium_src-c9e1715cfd9e925ece5f94a5028d5bb302765281.tar.bz2 |
Change UI font at startup time if necessary, based on the UI locale.
As of writing, ChromeDroidSans is used as the UI font (see
/etc/gtk-2.0/gtkrc). This setting does not work well for Japanese users
as Chinese glyphs are used for Kanji characters. For Japanese UI, we
should use a Japanese font.
Introduce IDS_UI_FONT_FAMILY_CROS to control the UI font based on the
UI locale. For now, app_locale_settings_ja.xtb only contains a
non-default value: IPAPGothic.
Just for the record, I originally tried to use "DroidSans Japanese"
but for some reason, this caused space characters (0x20) to be garbled
in the wrench menu. Hence, IPAPGotchic is chosen for now.
TEST=manually on the netbook, and ubuntu
BUG=chromium-os:4038
Review URL: http://codereview.chromium.org/3275008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58913 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/app.gyp | 3 | ||||
-rw-r--r-- | app/resources/app_locale_settings.grd | 51 | ||||
-rw-r--r-- | app/resources/app_locale_settings_ja.xtb | 1 |
3 files changed, 34 insertions, 21 deletions
diff --git a/app/app.gyp b/app/app.gyp index 4b1fde4..2c8e7f7 100644 --- a/app/app.gyp +++ b/app/app.gyp @@ -112,6 +112,9 @@ ['use_titlecase_in_grd_files==1', { 'action': ['-D', 'use_titlecase'], }], + ['chromeos==1', { + 'action': ['-D', 'chromeos'], + }], ], }, ], diff --git a/app/resources/app_locale_settings.grd b/app/resources/app_locale_settings.grd index cf799c3..9b900cd 100644 --- a/app/resources/app_locale_settings.grd +++ b/app/resources/app_locale_settings.grd @@ -176,29 +176,38 @@ Linux fonts do not have the issue Windows fonts for some locales (Indian) have. In that case, this need to be enclosed by platform-dependent if-clause. --> - <message name="IDS_UI_FONT_FAMILY" use_name_for_id="true"> - default - </message> - <!-- For Windows XP --> - <message name="IDS_UI_FONT_FAMILY_XP" use_name_for_id="true"> - default - </message> + <if expr="os == 'win32'"> + <message name="IDS_UI_FONT_FAMILY" use_name_for_id="true"> + default + </message> + <!-- For Windows XP --> + <message name="IDS_UI_FONT_FAMILY_XP" use_name_for_id="true"> + default + </message> - <!-- To get the actual UI font size for native UI components - (e.g. menu), the system UI font size is scaled with this value/100. - This should be 100 for most locales. --> - <message name="IDS_UI_FONT_SIZE_SCALER" use_name_for_id="true"> - 100 - </message> - <!-- For Windows XP --> - <message name="IDS_UI_FONT_SIZE_SCALER_XP" use_name_for_id="true"> - 100 - </message> + <!-- To get the actual UI font size for native UI components + (e.g. menu), the system UI font size is scaled with this value/100. + This should be 100 for most locales. --> + <message name="IDS_UI_FONT_SIZE_SCALER" use_name_for_id="true"> + 100 + </message> + <!-- For Windows XP --> + <message name="IDS_UI_FONT_SIZE_SCALER_XP" use_name_for_id="true"> + 100 + </message> - <!-- Limit minimum UI font size to 5 by default. --> - <message name="IDS_MINIMUM_UI_FONT_SIZE" use_name_for_id="true"> - 5 - </message> + <!-- Limit minimum UI font size to 5 by default. --> + <message name="IDS_MINIMUM_UI_FONT_SIZE" use_name_for_id="true"> + 5 + </message> + </if> + <!-- For Chrome OS --> + <if expr="pp_ifdef('chromeos')"> + <!-- The font name like: 'Font Name, 10' --> + <message name="IDS_UI_FONT_FAMILY_CROS" use_name_for_id="true"> + default + </message> + </if> </messages> </release> </grit> diff --git a/app/resources/app_locale_settings_ja.xtb b/app/resources/app_locale_settings_ja.xtb index 3a31fb1..933d47d 100644 --- a/app/resources/app_locale_settings_ja.xtb +++ b/app/resources/app_locale_settings_ja.xtb @@ -2,4 +2,5 @@ <!DOCTYPE translationbundle> <translationbundle lang="ja"> <translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> +<translation id="IDS_UI_FONT_FAMILY_CROS">IPAPGothic, 10</translation> </translationbundle> |