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

Unified Diff: tools/sk_tool_utils.cpp

Issue 1984943002: Implement support for rendering color emoji on Windows (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Add skia tests and other review feedback Created 4 years, 7 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
« no previous file with comments | « src/ports/SkScalerContext_win_dw.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/sk_tool_utils.cpp
diff --git a/tools/sk_tool_utils.cpp b/tools/sk_tool_utils.cpp
index 7343ce4744e661bd5a08600fb58df0d202c6d253..2317573e09123eef79bd2d281d3aa862e3a7174c 100644
--- a/tools/sk_tool_utils.cpp
+++ b/tools/sk_tool_utils.cpp
@@ -72,6 +72,9 @@ const char* platform_os_emoji() {
if (!strncmp(osName, "Mac", 3)) {
return "SBIX";
}
+ if (!strncmp(osName, "Win", 3)) {
+ return "COLR";
+ }
return "";
}
@@ -82,6 +85,9 @@ sk_sp<SkTypeface> emoji_typeface() {
if (!strcmp(sk_tool_utils::platform_os_emoji(), "SBIX")) {
return SkTypeface::MakeFromName("Apple Color Emoji", SkTypeface::kNormal);
}
+ if (!strcmp(sk_tool_utils::platform_os_emoji(), "COLR")) {
+ return SkTypeface::MakeFromName("Segoe UI Emoji", SkTypeface::kNormal);
bungeman-skia 2016/05/26 19:49:35 After running the trybots on this and taking a loo
Ilya Kulshin 2016/05/27 04:59:17 Done, although since this was creating the font ma
+ }
return nullptr;
}
@@ -89,7 +95,9 @@ const char* emoji_sample_text() {
if (!strcmp(sk_tool_utils::platform_os_emoji(), "CBDT")) {
return "Hamburgefons";
}
- if (!strcmp(sk_tool_utils::platform_os_emoji(), "SBIX")) {
+ if (!strcmp(sk_tool_utils::platform_os_emoji(), "SBIX") ||
+ !strcmp(sk_tool_utils::platform_os_emoji(), "COLR"))
+ {
return "\xF0\x9F\x92\xB0" "\xF0\x9F\x8F\xA1" "\xF0\x9F\x8E\x85" // 💰🏡🎅
"\xF0\x9F\x8D\xAA" "\xF0\x9F\x8D\x95" "\xF0\x9F\x9A\x80" // 🍪🍕🚀
"\xF0\x9F\x9A\xBB" "\xF0\x9F\x92\xA9" "\xF0\x9F\x93\xB7" // 🚻💩📷
« no previous file with comments | « src/ports/SkScalerContext_win_dw.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698