blob: ee6ab1979f4b5ed2b0f6ab83ad6adc5e746604cf [file] [log] [blame]
epoger@google.com7bc13a62012-02-14 14:53:59 +00001/*
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
tfarina@chromium.org7b3b26e2012-09-26 15:41:42 +00008#include "system_preferences.h"
epoger@google.com7bc13a62012-02-14 14:53:59 +00009
tfarina@chromium.org7b3b26e2012-09-26 15:41:42 +000010#import <Cocoa/Cocoa.h>
caryclark@google.com13130862012-06-06 12:10:45 +000011
epoger@google.com7bc13a62012-02-14 14:53:59 +000012void setSystemPreferences() {
13 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
14
15 // Set LCD font smoothing level for this application (does not affect other
16 // applications). Based on resetDefaultsToConsistentValues() in
17 // http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
caryclark@google.com13130862012-06-06 12:10:45 +000018 enum {
19 NoFontSmoothing = 0,
20 LightFontSmoothing = 1,
21 MediumFontSmoothing = 2,
22 StrongFontSmoothing = 3,
23 };
epoger@google.com7bc13a62012-02-14 14:53:59 +000024 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
25 [defaults setInteger:MediumFontSmoothing forKey:@"AppleFontSmoothing"];
26
27 [pool release];
28}