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

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

Issue 258953005: Renaming --enable-font-smoothing cmd line argument to --enable-font-antialiasing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Preparing for landing this as a 4 sided patch Created 6 years, 7 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 | « Source/platform/LayoutTestSupport.cpp ('k') | Source/web/WebKit.cpp » ('j') | 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // Web-fonts have artifical names constructed to always be: 105 // Web-fonts have artifical names constructed to always be:
106 // 1. 24 characters, followed by a '\0' 106 // 1. 24 characters, followed by a '\0'
107 // 2. the last two characters are '==' 107 // 2. the last two characters are '=='
108 return familyName.length() == 24 108 return familyName.length() == 24
109 && '=' == familyName[22] && '=' == familyName[23]; 109 && '=' == familyName[22] && '=' == familyName[23];
110 } 110 }
111 111
112 static int computePaintTextFlags(String fontFamilyName) 112 static int computePaintTextFlags(String fontFamilyName)
113 { 113 {
114 if (isRunningLayoutTest()) 114 if (isRunningLayoutTest())
115 return isFontSmoothingEnabledForTest() ? SkPaint::kAntiAlias_Flag : 0; 115 return isFontAntialiasingEnabledForTest() ? SkPaint::kAntiAlias_Flag : 0 ;
116 116
117 int textFlags = getSystemTextFlags(); 117 int textFlags = getSystemTextFlags();
118 118
119 // Many web-fonts are so poorly hinted that they are terrible to read when d rawn in BW. 119 // Many web-fonts are so poorly hinted that they are terrible to read when d rawn in BW.
120 // In these cases, we have decided to FORCE these fonts to be drawn with at least grayscale AA, 120 // In these cases, we have decided to FORCE these fonts to be drawn with at least grayscale AA,
121 // even when the System (getSystemTextFlags) tells us to draw only in BW. 121 // even when the System (getSystemTextFlags) tells us to draw only in BW.
122 if (isWebFont(fontFamilyName)) 122 if (isWebFont(fontFamilyName))
123 textFlags |= SkPaint::kAntiAlias_Flag; 123 textFlags |= SkPaint::kAntiAlias_Flag;
124 124
125 return textFlags; 125 return textFlags;
126 } 126 }
127 127
128 128
129 void FontPlatformData::querySystemForRenderStyle(bool) 129 void FontPlatformData::querySystemForRenderStyle(bool)
130 { 130 {
131 m_paintTextFlags = computePaintTextFlags(fontFamilyName()); 131 m_paintTextFlags = computePaintTextFlags(fontFamilyName());
132 } 132 }
133 133
134 bool FontPlatformData::defaultUseSubpixelPositioning() 134 bool FontPlatformData::defaultUseSubpixelPositioning()
135 { 135 {
136 return FontCache::fontCache()->useSubpixelPositioning(); 136 return FontCache::fontCache()->useSubpixelPositioning();
137 } 137 }
138 138
139 } // namespace WebCore 139 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/LayoutTestSupport.cpp ('k') | Source/web/WebKit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698