Use GSFontAntiAlias to decide whether antialiasing should be enabled in the default rendering hints.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@14537 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2002-09-24 12:39:53 +00:00
parent bec53bc686
commit 79ee0fe839
2 changed files with 19 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2002-09-24 14:38 Alexander Malmberg <alexander@malmberg.org>
* Source/art/ftfont.m: Use GSFontAntiAlias defaults value to decide
whether antialiasing should be enabled in the default rendering
hints.
2002-09-24 13:22 Alexander Malmberg <alexander@malmberg.org>
* Source/x11/XWindowBuffer.m (+windowBufferForWindow:depthInfo:):

View file

@ -67,6 +67,9 @@ from the back-art-subpixel-text defaults key
static int subpixel_text;
static BOOL anti_alias_by_default;
@class FTFaceInfo;
@interface FTFontInfo : GSFontInfo <FTFontInfo>
@ -290,7 +293,12 @@ static void add_face(NSString *family, NSString *face, NSDictionary *d,
if ([d objectForKey: @"RenderHints_hack"])
fi->render_hints_hack=strtol([[d objectForKey: @"RenderHints_hack"] cString],NULL,0);
else
fi->render_hints_hack=0x10202;
{
if (anti_alias_by_default)
fi->render_hints_hack=0x10202;
else
fi->render_hints_hack=0x00202;
}
fi->familyName = [family copy];
@ -1362,8 +1370,6 @@ static int filters[3][7]=
if (FTC_CMapCache_New(ftc_manager, &ftc_cmapcache))
NSLog(@"FTC_CMapCache_New failed");
load_font_configuration();
{
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
NSString *s;
@ -1372,6 +1378,8 @@ static int filters[3][7]=
subpixel_text = [ud integerForKey: @"back-art-subpixel-text"];
anti_alias_by_default = [ud boolForKey: @"GSFontAntiAlias"];
/* To make it easier to find an optimal (or at least good) filter,
the filters are configurable (for now). */
for (i = 0; i < 3; i++)
@ -1412,6 +1420,8 @@ static int filters[3][7]=
}
}
}
load_font_configuration();
}