diff options
author | falken@chromium.org <falken@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 05:01:20 +0000 |
---|---|---|
committer | falken@chromium.org <falken@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 05:01:20 +0000 |
commit | 28e466cf8282a13c22ff64eb762b7adef8f68f11 (patch) | |
tree | e6816e0ab6e5a4c6439fc6fb15c914fd118336b5 /ui/gfx/platform_font_gtk.h | |
parent | f24fd5c6ebb17b4b74e006c74bb2236218e88b1f (diff) | |
download | chromium_src-28e466cf8282a13c22ff64eb762b7adef8f68f11.zip chromium_src-28e466cf8282a13c22ff64eb762b7adef8f68f11.tar.gz chromium_src-28e466cf8282a13c22ff64eb762b7adef8f68f11.tar.bz2 |
Switch fonts when Chrome OS locale changes.
This patch is just a start. When locale changes through the
login screen UI, the fonts in ResourceBundle and
PlatformFontGtk are updated, and the password fields and
username labels are redrawn with the correct font. In the
future, all widgets in the login screen would be redrawn
with the correct font.
When the locale changes upon login, the fonts are updated,
though not all widgets are redrawn correctly yet.
BUG=chromium-os:13450
TEST=manually
Review URL: http://codereview.chromium.org/6788004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80579 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/platform_font_gtk.h')
-rw-r--r-- | ui/gfx/platform_font_gtk.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/gfx/platform_font_gtk.h b/ui/gfx/platform_font_gtk.h index 7f7a4ec..2159752 100644 --- a/ui/gfx/platform_font_gtk.h +++ b/ui/gfx/platform_font_gtk.h @@ -27,6 +27,11 @@ class PlatformFontGtk : public PlatformFont { // pango_font_description_free(). static PangoFontDescription* PangoFontFromGfxFont(const gfx::Font& gfx_font); + // Resets and reloads the cached system font used by the default constructor. + // This function is useful when the system font has changed, for example, when + // the locale has changed. + static void ReloadDefaultFont(); + // Position as an offset from the height of the drawn text, used to draw // an underline. This is a negative number, so the underline would be // drawn at y + height + underline_position; |