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

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

Issue 206693003: Use default SkFontMgr on Windows. (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 namespace WebCore { 43 namespace WebCore {
44 44
45 FontCache::FontCache() 45 FontCache::FontCache()
46 : m_purgePreventCount(0) 46 : m_purgePreventCount(0)
47 { 47 {
48 SkFontMgr* fontManager = 0; 48 SkFontMgr* fontManager = 0;
49 49
50 // Prefer DirectWrite (if runtime feature is enabled) but fallback 50 // Prefer DirectWrite (if runtime feature is enabled) but fallback
51 // to GDI on platforms where DirectWrite is not supported. 51 // to GDI on platforms where DirectWrite is not supported.
52 if (RuntimeEnabledFeatures::directWriteEnabled()) 52 if (RuntimeEnabledFeatures::directWriteEnabled())
53 fontManager = SkFontMgr_New_DirectWrite(); 53 fontManager = SkFontMgr::RefDefault();
54 54
55 // Subpixel text positioning is not supported by the GDI backend. 55 // Subpixel text positioning is not supported by the GDI backend.
56 m_useSubpixelPositioning = fontManager 56 m_useSubpixelPositioning = fontManager
57 ? RuntimeEnabledFeatures::subpixelFontScalingEnabled() 57 ? RuntimeEnabledFeatures::subpixelFontScalingEnabled()
58 : false; 58 : false;
59 59
60 if (!fontManager) 60 if (!fontManager)
61 fontManager = SkFontMgr_New_GDI(); 61 fontManager = SkFontMgr_New_GDI();
62 62
63 m_fontManager = adoptPtr(fontManager); 63 m_fontManager = adoptPtr(fontManager);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 name.data(), 210 name.data(),
211 fontSize, 211 fontSize,
212 fontDescription.weight() >= FontWeightBold && !tf->isBold() || fontDescr iption.isSyntheticBold(), 212 fontDescription.weight() >= FontWeightBold && !tf->isBold() || fontDescr iption.isSyntheticBold(),
213 fontDescription.style() == FontStyleItalic && !tf->isItalic() || fontDes cription.isSyntheticItalic(), 213 fontDescription.style() == FontStyleItalic && !tf->isItalic() || fontDes cription.isSyntheticItalic(),
214 fontDescription.orientation(), 214 fontDescription.orientation(),
215 m_useSubpixelPositioning); 215 m_useSubpixelPositioning);
216 return result; 216 return result;
217 } 217 }
218 218
219 } 219 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698