mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-30 08:51:03 +00:00
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:
parent
b78ff5291f
commit
865364a6da
2 changed files with 19 additions and 3 deletions
|
@ -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>
|
2002-09-24 13:22 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
* Source/x11/XWindowBuffer.m (+windowBufferForWindow:depthInfo:):
|
* Source/x11/XWindowBuffer.m (+windowBufferForWindow:depthInfo:):
|
||||||
|
|
|
@ -67,6 +67,9 @@ from the back-art-subpixel-text defaults key
|
||||||
static int subpixel_text;
|
static int subpixel_text;
|
||||||
|
|
||||||
|
|
||||||
|
static BOOL anti_alias_by_default;
|
||||||
|
|
||||||
|
|
||||||
@class FTFaceInfo;
|
@class FTFaceInfo;
|
||||||
|
|
||||||
@interface FTFontInfo : GSFontInfo <FTFontInfo>
|
@interface FTFontInfo : GSFontInfo <FTFontInfo>
|
||||||
|
@ -290,7 +293,12 @@ static void add_face(NSString *family, NSString *face, NSDictionary *d,
|
||||||
if ([d objectForKey: @"RenderHints_hack"])
|
if ([d objectForKey: @"RenderHints_hack"])
|
||||||
fi->render_hints_hack=strtol([[d objectForKey: @"RenderHints_hack"] cString],NULL,0);
|
fi->render_hints_hack=strtol([[d objectForKey: @"RenderHints_hack"] cString],NULL,0);
|
||||||
else
|
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];
|
fi->familyName = [family copy];
|
||||||
|
|
||||||
|
@ -1362,8 +1370,6 @@ static int filters[3][7]=
|
||||||
if (FTC_CMapCache_New(ftc_manager, &ftc_cmapcache))
|
if (FTC_CMapCache_New(ftc_manager, &ftc_cmapcache))
|
||||||
NSLog(@"FTC_CMapCache_New failed");
|
NSLog(@"FTC_CMapCache_New failed");
|
||||||
|
|
||||||
load_font_configuration();
|
|
||||||
|
|
||||||
{
|
{
|
||||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||||
NSString *s;
|
NSString *s;
|
||||||
|
@ -1372,6 +1378,8 @@ static int filters[3][7]=
|
||||||
|
|
||||||
subpixel_text = [ud integerForKey: @"back-art-subpixel-text"];
|
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,
|
/* To make it easier to find an optimal (or at least good) filter,
|
||||||
the filters are configurable (for now). */
|
the filters are configurable (for now). */
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
|
@ -1412,6 +1420,8 @@ static int filters[3][7]=
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
load_font_configuration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue