mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 23:42:16 +00:00
* Source/cairo/CairoFontEnumerator.m: Allow for Windows default
fonts. * Source/win32/w32_GLcontext.m, * Source/x11/XGGLContext.m: Implement 10.6 methods to get/set the CGLContextObj. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@35419 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
86a9b9ca74
commit
43fe122a1c
4 changed files with 97 additions and 9 deletions
|
@ -1,3 +1,11 @@
|
|||
2012-08-17 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/cairo/CairoFontEnumerator.m: Allow for Windows default
|
||||
fonts.
|
||||
* Source/win32/w32_GLcontext.m,
|
||||
* Source/x11/XGGLContext.m: Implement 10.6 methods to get/set the
|
||||
CGLContextObj.
|
||||
|
||||
2012-06-21 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* configure.ac: use AC_CHECK_LIB to check for cairo if pkg-config
|
||||
|
|
|
@ -212,33 +212,71 @@ static NSArray *faFromFc(FcPattern *pat)
|
|||
- (NSString *) defaultSystemFontName
|
||||
{
|
||||
if ([allFontNames containsObject: @"Bitstream Vera Sans"])
|
||||
return @"Bitstream Vera Sans";
|
||||
{
|
||||
return @"Bitstream Vera Sans";
|
||||
}
|
||||
if ([allFontNames containsObject: @"FreeSans"])
|
||||
return @"FreeSans";
|
||||
{
|
||||
return @"FreeSans";
|
||||
}
|
||||
if ([allFontNames containsObject: @"DejaVu Sans"])
|
||||
return @"DejaVu Sans";
|
||||
{
|
||||
return @"DejaVu Sans";
|
||||
}
|
||||
if ([allFontNames containsObject: @"Tahoma"])
|
||||
{
|
||||
return @"Tahoma";
|
||||
}
|
||||
if ([allFontNames containsObject: @"Arial"])
|
||||
{
|
||||
return @"Arial";
|
||||
}
|
||||
return @"Helvetica";
|
||||
}
|
||||
|
||||
- (NSString *) defaultBoldSystemFontName
|
||||
{
|
||||
if ([allFontNames containsObject: @"Bitstream Vera Sans-Bold"])
|
||||
return @"Bitstream Vera Sans-Bold";
|
||||
{
|
||||
return @"Bitstream Vera Sans-Bold";
|
||||
}
|
||||
if ([allFontNames containsObject: @"FreeSans-Bold"])
|
||||
return @"FreeSans-Bold";
|
||||
{
|
||||
return @"FreeSans-Bold";
|
||||
}
|
||||
if ([allFontNames containsObject: @"DejaVu Sans-Bold"])
|
||||
return @"DejaVu Sans-Bold";
|
||||
{
|
||||
return @"DejaVu Sans-Bold";
|
||||
}
|
||||
if ([allFontNames containsObject: @"Tahoma-Bold"])
|
||||
{
|
||||
return @"Tahoma-Bold";
|
||||
}
|
||||
if ([allFontNames containsObject: @"Arial-Bold"])
|
||||
{
|
||||
return @"Arial-Bold";
|
||||
}
|
||||
return @"Helvetica-Bold";
|
||||
}
|
||||
|
||||
- (NSString *) defaultFixedPitchFontName
|
||||
{
|
||||
if ([allFontNames containsObject: @"Bitstream Vera Sans Mono"])
|
||||
return @"Bitstream Vera Sans Mono";
|
||||
{
|
||||
return @"Bitstream Vera Sans Mono";
|
||||
}
|
||||
if ([allFontNames containsObject: @"FreeMono"])
|
||||
return @"FreeMono";
|
||||
{
|
||||
return @"FreeMono";
|
||||
}
|
||||
if ([allFontNames containsObject: @"DejaVu Sans Mono"])
|
||||
return @"DejaVu Sans Mono";
|
||||
{
|
||||
return @"DejaVu Sans Mono";
|
||||
}
|
||||
if ([allFontNames containsObject: @"Courier New"])
|
||||
{
|
||||
return @"Courier New";
|
||||
}
|
||||
return @"Courier";
|
||||
}
|
||||
|
||||
|
|
|
@ -284,6 +284,13 @@ static Win32GLContext *currentGLContext;
|
|||
}
|
||||
}
|
||||
|
||||
- (void *)CGLContextObj
|
||||
{
|
||||
// FIXME: Until we have a wrapper library
|
||||
// return the underlying context directly
|
||||
return (void*)wgl_context;
|
||||
}
|
||||
|
||||
- (void)clearDrawable
|
||||
{
|
||||
[self _detach];
|
||||
|
@ -327,6 +334,20 @@ static Win32GLContext *currentGLContext;
|
|||
}
|
||||
|
||||
|
||||
- (id)initWithCGLContextObj: (void *)context
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (!self)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
// FIXME: Need to set the pixelFormat ivar
|
||||
wgl_context = context;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithFormat:(NSOpenGLPixelFormat *)aFormat
|
||||
shareContext:(NSOpenGLContext *)share
|
||||
{
|
||||
|
|
|
@ -301,6 +301,13 @@ static XGGLContext *currentGLContext;
|
|||
return glx_context;
|
||||
}
|
||||
|
||||
- (void *)CGLContextObj
|
||||
{
|
||||
// FIXME: Until we have a wrapper library
|
||||
// return the underlying context directly
|
||||
return (void*)glx_context;
|
||||
}
|
||||
|
||||
- (void)clearDrawable
|
||||
{
|
||||
[self _detach];
|
||||
|
@ -360,6 +367,20 @@ static XGGLContext *currentGLContext;
|
|||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
||||
- (id)initWithCGLContextObj: (void *)context
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (!self)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
// FIXME: Need to set the pixelFormat ivar
|
||||
glx_context = context;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithFormat: (NSOpenGLPixelFormat *)_format
|
||||
shareContext: (NSOpenGLContext *)share
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue