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

Unified Diff: third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm

Issue 2137483004: Enable "system-ui" generic font family (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor and cleanup Created 4 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: third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
diff --git a/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm b/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
index 5956c7a737beead71d6df78f75f6246d807c35e4..a9b9a9eccb1958e2dd3d24e0dc0f1b50ab24f766 100644
--- a/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
+++ b/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
@@ -61,6 +61,19 @@ namespace blink {
const char* kColorEmojiFontMac = "Apple Color Emoji";
+// static
+const AtomicString& FontCache::legacySystemFontFamily() {
+ DEFINE_STATIC_LOCAL(AtomicString, legacySystemFontFamily,
+ ("BlinkMacSystemFont"));
+ return legacySystemFontFamily;
+}
+
+// static
+const AtomicString& FontCache::systemFontFamily(float) {
drott 2016/10/12 11:01:59 When will you need the parameter? If Mac instantia
kojii 2016/10/12 11:14:52 I'm thinking to replace "system-ui" with ".SF NS T
drott 2016/10/13 07:59:34 So you're saying you would like to move the replac
kojii 2016/10/13 09:03:20 Yes, that way we can keep one SkTypeface/SimpleFon
drott 2016/10/13 12:36:13 Yes, sounds reasonable.
+ // TODO(kojii): Get the actual font name for the size.
+ return FontFamilyNames::system_ui;
+}
+
static void invalidateFontCache() {
if (!isMainThread()) {
Platform::current()->mainThread()->getWebTaskRunner()->postTask(

Powered by Google App Engine
This is Rietveld 408576698