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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp

Issue 2137483004: Enable "system-ui" generic font family (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: drott nit 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Computer, Inc. 2 * Copyright (C) 2006, 2007 Apple Computer, Inc.
3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved. 3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // static 69 // static
70 void FontCache::addSideloadedFontForTesting(SkTypeface* typeface) { 70 void FontCache::addSideloadedFontForTesting(SkTypeface* typeface) {
71 if (!s_sideloadedFonts) 71 if (!s_sideloadedFonts)
72 s_sideloadedFonts = new HashMap<String, sk_sp<SkTypeface>>; 72 s_sideloadedFonts = new HashMap<String, sk_sp<SkTypeface>>;
73 SkString name; 73 SkString name;
74 typeface->getFamilyName(&name); 74 typeface->getFamilyName(&name);
75 s_sideloadedFonts->set(name.c_str(), sk_sp<SkTypeface>(typeface)); 75 s_sideloadedFonts->set(name.c_str(), sk_sp<SkTypeface>(typeface));
76 } 76 }
77 77
78 // static 78 // static
79 const AtomicString& FontCache::systemFontFamily() {
80 return menuFontFamily();
81 }
82
83 // static
79 void FontCache::setMenuFontMetrics(const wchar_t* familyName, 84 void FontCache::setMenuFontMetrics(const wchar_t* familyName,
80 int32_t fontHeight) { 85 int32_t fontHeight) {
81 s_menuFontFamilyName = new AtomicString(familyName); 86 s_menuFontFamilyName = new AtomicString(familyName);
82 s_menuFontHeight = ensureMinimumFontHeightIfNeeded(fontHeight); 87 s_menuFontHeight = ensureMinimumFontHeightIfNeeded(fontHeight);
83 } 88 }
84 89
85 // static 90 // static
86 void FontCache::setSmallCaptionFontMetrics(const wchar_t* familyName, 91 void FontCache::setSmallCaptionFontMetrics(const wchar_t* familyName,
87 int32_t fontHeight) { 92 int32_t fontHeight) {
88 s_smallCaptionFontFamilyName = new AtomicString(familyName); 93 s_smallCaptionFontFamilyName = new AtomicString(familyName);
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 if (typefacesMatchesFamily(tf.get(), family)) { 413 if (typefacesMatchesFamily(tf.get(), family)) {
409 result->setMinSizeForSubpixel(minSizeForSubpixelForFont); 414 result->setMinSizeForSubpixel(minSizeForSubpixelForFont);
410 break; 415 break;
411 } 416 }
412 } 417 }
413 418
414 return result; 419 return result;
415 } 420 }
416 421
417 } // namespace blink 422 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698