diff --git a/Headers/xlib/XGPrivate.h b/Headers/xlib/XGPrivate.h index 768893e..3a01cc9 100644 --- a/Headers/xlib/XGPrivate.h +++ b/Headers/xlib/XGPrivate.h @@ -79,7 +79,7 @@ extern unsigned long XGFontPropULong(Display *dpy, XFontStruct *font_struct, - (void) drawGlyphs: (const NSGlyph *) glyphs length: (int) len onDisplay: (Display*) xdpy drawable: (Drawable) draw with: (GC) xgcntxt at: (XPoint) xp; -- (float) widthOfGlyphs: (const NSGlyph *) glyphs length: (int) len; +- (CGFloat) widthOfGlyphs: (const NSGlyph *) glyphs length: (int) len; @end diff --git a/Source/xlib/GSXftFontInfo.m b/Source/xlib/GSXftFontInfo.m index fd5df77..c065028 100644 --- a/Source/xlib/GSXftFontInfo.m +++ b/Source/xlib/GSXftFontInfo.m @@ -408,7 +408,7 @@ Ones(unsigned int n) len, &extents); - return extents.width; + return (CGFloat)extents.width; } - (NSMultibyteGlyphPacking)glyphPacking diff --git a/Source/xlib/XGFont.m b/Source/xlib/XGFont.m index 6af8da3..b13c1c4 100644 --- a/Source/xlib/XGFont.m +++ b/Source/xlib/XGFont.m @@ -241,7 +241,7 @@ static BOOL XGInitAtoms(Display *dpy) - (CGFloat) widthOf: (const char*) s length: (int) len { - return XTextWidth(font_info, s, len); + return (CGFloat)XTextWidth(font_info, s, len); } - (CGFloat) widthOfGlyphs: (const NSGlyph *) glyphs length: (int) len @@ -254,7 +254,7 @@ static BOOL XGInitAtoms(Display *dpy) buf[i] = glyphs[i]; } - return XTextWidth(font_info, buf, len); + return (CGFloat)XTextWidth(font_info, buf, len); } - (void) setActiveFor: (Display*) xdpy gc: (GC) xgcntxt diff --git a/Source/xlib/XGFontManager.m b/Source/xlib/XGFontManager.m index 4b0fee6..7848187 100644 --- a/Source/xlib/XGFontManager.m +++ b/Source/xlib/XGFontManager.m @@ -106,7 +106,7 @@ cache_name() if ([mgr fileExistsAtPath: path isDirectory: &flag] == NO || flag == NO) { NSLog(@"Library directory '%@' not available!", path); - return NO; + return nil; } path = [path stringByAppendingPathComponent: @"Fonts"]; if ([mgr fileExistsAtPath: path] == NO) @@ -116,7 +116,7 @@ cache_name() if ([mgr fileExistsAtPath: path isDirectory: &flag] == NO || flag == NO) { NSLog(@"Fonts directory '%@' not available!", path); - return NO; + return nil; } path = [path stringByAppendingPathComponent: @"Cache"]; if ([mgr fileExistsAtPath: path] == NO) @@ -126,7 +126,7 @@ cache_name() if ([mgr fileExistsAtPath: path isDirectory: &flag] == NO || flag == NO) { NSLog(@"Fonts directory '%@' not available!", path); - return NO; + return nil; } cacheName = [path stringByAppendingPathComponent: file_name]; RETAIN(cacheName);