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

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

Issue 1877673002: Move legacyCreateTypeface to SkFontStyle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove DEPS change now that Skia change has landed. Created 4 years, 8 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, 2008, 2009, 2010, 2012 Google Inc. All rights reser ved. 2 * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2012 Google Inc. All rights reser ved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 namespace { 46 namespace {
47 47
48 static inline bool isFontPresent(const UChar* fontName, SkFontMgr* fontManager) 48 static inline bool isFontPresent(const UChar* fontName, SkFontMgr* fontManager)
49 { 49 {
50 String family = fontName; 50 String family = fontName;
51 SkTypeface* typeface; 51 SkTypeface* typeface;
52 if (FontCache::useDirectWrite()) 52 if (FontCache::useDirectWrite())
53 typeface = fontManager->matchFamilyStyle(family.utf8().data(), SkFontSty le()); 53 typeface = fontManager->matchFamilyStyle(family.utf8().data(), SkFontSty le());
54 else 54 else
55 typeface = fontManager->legacyCreateTypeface(family.utf8().data(), SkTyp eface::kNormal); 55 typeface = fontManager->legacyCreateTypeface(family.utf8().data(), SkFon tStyle());
56 56
57 if (!typeface) 57 if (!typeface)
58 return false; 58 return false;
59 59
60 RefPtr<SkTypeface> tf = adoptRef(typeface); 60 RefPtr<SkTypeface> tf = adoptRef(typeface);
61 SkTypeface::LocalizedStrings* actualFamilies = tf->createFamilyNameIterator( ); 61 SkTypeface::LocalizedStrings* actualFamilies = tf->createFamilyNameIterator( );
62 bool matchesRequestedFamily = false; 62 bool matchesRequestedFamily = false;
63 SkTypeface::LocalizedString actualFamily; 63 SkTypeface::LocalizedString actualFamily;
64 while (actualFamilies->next(&actualFamily)) { 64 while (actualFamilies->next(&actualFamily)) {
65 if (equalIgnoringCase(family, AtomicString::fromUTF8(actualFamily.fStrin g.c_str()))) { 65 if (equalIgnoringCase(family, AtomicString::fromUTF8(actualFamily.fStrin g.c_str()))) {
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 family = L"lucida sans unicode"; 545 family = L"lucida sans unicode";
546 } 546 }
547 } 547 }
548 548
549 if (scriptChecked) 549 if (scriptChecked)
550 *scriptChecked = script; 550 *scriptChecked = script;
551 return family; 551 return family;
552 } 552 }
553 553
554 } // namespace blink 554 } // 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