2012-02-14 18:53:59 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2012 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
2012-09-26 19:41:42 +04:00
|
|
|
#include "system_preferences.h"
|
2012-02-14 18:53:59 +04:00
|
|
|
|
2012-09-26 19:41:42 +04:00
|
|
|
#import <Cocoa/Cocoa.h>
|
2012-06-06 16:10:45 +04:00
|
|
|
|
2012-02-14 18:53:59 +04:00
|
|
|
void setSystemPreferences() {
|
|
|
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
|
|
|
|
|
|
|
// Set LCD font smoothing level for this application (does not affect other
|
|
|
|
// applications). Based on resetDefaultsToConsistentValues() in
|
|
|
|
// http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
|
2012-06-06 16:10:45 +04:00
|
|
|
enum {
|
|
|
|
NoFontSmoothing = 0,
|
|
|
|
LightFontSmoothing = 1,
|
|
|
|
MediumFontSmoothing = 2,
|
|
|
|
StrongFontSmoothing = 3,
|
|
|
|
};
|
2012-02-14 18:53:59 +04:00
|
|
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
|
|
|
[defaults setInteger:MediumFontSmoothing forKey:@"AppleFontSmoothing"];
|
|
|
|
|
|
|
|
[pool release];
|
|
|
|
}
|