1 /* 2 * Copyright 2012 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #import <Cocoa/Cocoa.h> 9 10 void setSystemPreferences() { 11 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 12 13 // Set LCD font smoothing level for this application (does not affect other 14 // applications). Based on resetDefaultsToConsistentValues() in 15 // http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 16 static const int NoFontSmoothing = 0; 17 static const int LightFontSmoothing = 1; 18 static const int MediumFontSmoothing = 2; 19 static const int StrongFontSmoothing = 3; 20 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 21 [defaults setInteger:MediumFontSmoothing forKey:@"AppleFontSmoothing"]; 22 23 [pool release]; 24 } 25