summaryrefslogtreecommitdiffstats
path: root/chrome/common/gfx
diff options
context:
space:
mode:
authorjungshik@google.com <jungshik@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 21:30:51 +0000
committerjungshik@google.com <jungshik@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 21:30:51 +0000
commit243ed6775d053407531a16ce1bf986f1df697f62 (patch)
tree5d8b46fa35fcf4c2dcf65652488fc914a4235ecf /chrome/common/gfx
parent1c370c041ab3333d091efdfbbc814853934d574d (diff)
downloadchromium_src-243ed6775d053407531a16ce1bf986f1df697f62.zip
chromium_src-243ed6775d053407531a16ce1bf986f1df697f62.tar.gz
chromium_src-243ed6775d053407531a16ce1bf986f1df697f62.tar.bz2
Make the font family and the font size used in dom UI localizable. This is a part 1 of the fix for bug 7319 and will be followed by part 2 for non-DOM UI.
For some Indian languages (Malayalam, Bengali and Telugu), we have to use a bigger size and a font family for that script on Windows. This is because Windows' stock fonts for those scripts are smaller than fonts for other scripts at a given size. I removed 'WEB' style in chrome_font.h because it's not used anywhere any more after our switch to the html UI. In addition, IDS_WEB_FONT_FAMILY is recycled to localize the font family (or the list of font families) for html UI. I also back-ported the support for setting 'style.fooBar' property to our copy of Jstemplate (JstProcessor.prototype.jstValues_). BUG=7319 Review URL: http://codereview.chromium.org/57025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/gfx')
-rw-r--r--chrome/common/gfx/chrome_font.h3
-rw-r--r--chrome/common/gfx/chrome_font_win.cc6
2 files changed, 1 insertions, 8 deletions
diff --git a/chrome/common/gfx/chrome_font.h b/chrome/common/gfx/chrome_font.h
index 16d491a..af68aa1 100644
--- a/chrome/common/gfx/chrome_font.h
+++ b/chrome/common/gfx/chrome_font.h
@@ -47,7 +47,6 @@ class ChromeFont {
BOLD = 1,
ITALIC = 2,
UNDERLINED = 4,
- WEB = 8, // TODO(agl): what does this mean?
};
// Creates a ChromeFont given font name (e.g. arial), font size (e.g. 12).
@@ -66,7 +65,7 @@ class ChromeFont {
// size_deta is the size to add to the current font. See the single
// argument version of this method for an example.
// The style parameter specifies the new style for the font, and is a
- // bitmask of the values: BOLD, ITALIC, UNDERLINED and WEB.
+ // bitmask of the values: BOLD, ITALIC and UNDERLINED.
ChromeFont DeriveFont(int size_delta, int style) const;
// Returns the number of vertical pixels needed to display characters from
diff --git a/chrome/common/gfx/chrome_font_win.cc b/chrome/common/gfx/chrome_font_win.cc
index a1ae955..6fd6753 100644
--- a/chrome/common/gfx/chrome_font_win.cc
+++ b/chrome/common/gfx/chrome_font_win.cc
@@ -148,12 +148,6 @@ ChromeFont ChromeFont::DeriveFont(int size_delta, int style) const {
font_info.lfItalic = ((style & ITALIC) == ITALIC);
font_info.lfWeight = (style & BOLD) ? FW_BOLD : FW_NORMAL;
- if (style & WEB) {
- font_info.lfPitchAndFamily = FF_SWISS;
- wcscpy_s(font_info.lfFaceName,
- l10n_util::GetString(IDS_WEB_FONT_FAMILY).c_str());
- }
-
HFONT hfont = CreateFontIndirect(&font_info);
return ChromeFont(CreateHFontRef(hfont));
}