| OLD | NEW |
| 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 Loading... |
| 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(float) { |
| 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 Loading... |
| 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 |
| OLD | NEW |