Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: webkit/glue/webpreferences.cc

Issue 10540022: mac: Plumbing for the emoji font. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whoops Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/glue/webpreferences.cc
diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc
index e6ff5577674b1486530758ddbb98ffb942cee703..057f639ddef9b670d7f96ea23b1afa81167f536b 100644
--- a/webkit/glue/webpreferences.cc
+++ b/webkit/glue/webpreferences.cc
@@ -133,6 +133,12 @@ WebPreferences::WebPreferences()
ASCIIToUTF16("Script");
fantasy_font_family_map[kCommonScript] =
ASCIIToUTF16("Impact");
+ pictograph_font_family_map[kCommonScript] =
+#if !defined(OS_MACOSX)
+ ASCIIToUTF16("Times New Roman");
tony 2012/10/05 17:35:22 Do we ever end up using the default value? Do we
+#else
+ ASCIIToUTF16("Apple Color Emoji");
+#endif
}
WebPreferences::~WebPreferences() {
@@ -176,6 +182,12 @@ void setFantasyFontFamilyWrapper(WebSettings* settings,
settings->setFantasyFontFamily(font, script);
}
+void setPictographFontFamilyWrapper(WebSettings* settings,
+ const string16& font,
+ UScriptCode script) {
+ settings->setPictographFontFamily(font, script);
+}
+
typedef void (*SetFontFamilyWrapper)(
WebKit::WebSettings*, const string16&, UScriptCode);
@@ -228,6 +240,8 @@ void WebPreferences::Apply(WebView* web_view) const {
settings);
ApplyFontsFromMap(fantasy_font_family_map, setFantasyFontFamilyWrapper,
settings);
+ ApplyFontsFromMap(pictograph_font_family_map, setPictographFontFamilyWrapper,
+ settings);
settings->setDefaultFontSize(default_font_size);
settings->setDefaultFixedFontSize(default_fixed_font_size);
settings->setMinimumFontSize(minimum_font_size);
« chrome/app/resources/locale_settings_win.grd ('K') | « webkit/glue/webpreferences.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698