mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 23:42:16 +00:00
Adjust to the CGFloat change for NSFont
and NSAffineTransform done in base and gui. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29689 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
959b852c71
commit
92fdccd8d3
13 changed files with 52 additions and 41 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
2010-02-20 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/gsc/GSStreamContext.m
|
||||
* Headers/cairo/CairoFontInfo.h
|
||||
* Source/cairo/CairoFontInfo.m
|
||||
* Source/cairo/CairoGState.m
|
||||
* Source/winlib/WIN32FontInfo.m
|
||||
* Source/art/ftfont.m
|
||||
* Source/art/ftfont-old.m
|
||||
* Headers/xlib/GSXftFontInfo.h
|
||||
* Headers/xlib/XGFontSetFontInfo.h
|
||||
* Source/xlib/XGFontSetFontInfo.m
|
||||
* Source/xlib/GSXftFontInfo.m
|
||||
* Source/xlib/XGFont.m: Adjust to the CGFloat change for NSFont
|
||||
and NSAffineTransform done in base and gui.
|
||||
|
||||
2010-02-11 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* Documentation/Back/GNUmakefile: Do not try including the
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
cairo_scaled_font_t *_scaled;
|
||||
CairoFaceInfo *_faceInfo;
|
||||
BOOL _screenFont;
|
||||
float lineHeight;
|
||||
CGFloat lineHeight;
|
||||
|
||||
unsigned int _cacheSize;
|
||||
unsigned int *_cachedGlyphs;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <X11/Xft/Xft.h>
|
||||
#undef id
|
||||
|
||||
#include <GNUstepGUI/GSFontInfo.h>
|
||||
#import <GNUstepGUI/GSFontInfo.h>
|
||||
|
||||
@interface FcFontEnumerator : GSFontEnumerator
|
||||
{
|
||||
|
@ -51,7 +51,7 @@
|
|||
- (void) draw: (const char*) s length: (int) len
|
||||
onDisplay: (Display*) xdpy drawable: (Drawable) draw
|
||||
with: (GC) xgcntxt at: (XPoint) xp;
|
||||
- (float) widthOf: (const char*) s length: (int) len;
|
||||
- (CGFloat) widthOf: (const char*) s length: (int) len;
|
||||
- (void) setActiveFor: (Display*) xdpy gc: (GC) xgcntxt;
|
||||
|
||||
@end
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#define __XGFontSetFontInfo_h
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <GNUstepGUI/GSFontInfo.h>
|
||||
#import <GNUstepGUI/GSFontInfo.h>
|
||||
|
||||
#ifdef X_HAVE_UTF8_STRING
|
||||
|
||||
|
@ -58,23 +58,18 @@
|
|||
int _num_fonts;
|
||||
}
|
||||
|
||||
- (id) initWithFontName: (NSString *)name
|
||||
matrix: (const float *)matrix
|
||||
- (id) initWithFontName: (NSString*)name
|
||||
matrix: (const CGFloat*)matrix
|
||||
screenFont: (BOOL)screenFont;
|
||||
- (void) dealloc;
|
||||
- (NSSize) advancementForGlyph: (NSGlyph)glyph;
|
||||
- (NSRect) boundingRectForGlyph: (NSGlyph)glyph;
|
||||
- (BOOL) glyphIsEncoded: (NSGlyph)glyph;
|
||||
- (NSGlyph) glyphWithName: (NSString *)glyphName;
|
||||
- (void) drawGlyphs: (const NSGlyph *)glyphs
|
||||
- (void) drawGlyphs: (const NSGlyph*)glyphs
|
||||
length: (int)len
|
||||
onDisplay: (Display *)dpy
|
||||
onDisplay: (Display*)dpy
|
||||
drawable: (Drawable)win
|
||||
with: (GC)gc
|
||||
at: (XPoint)xp;
|
||||
- (float) widthOfGlyphs: (const NSGlyph *)glyphs
|
||||
- (CGFloat) widthOfGlyphs: (const NSGlyph*)glyphs
|
||||
length: (int)len;
|
||||
- (void) setActiveFor: (Display *)dpy
|
||||
- (void) setActiveFor: (Display*)dpy
|
||||
gc: (GC)gc;
|
||||
|
||||
@end // XGFontSetFontInfo : GSFontInfo
|
||||
|
|
|
@ -107,7 +107,7 @@ static int subpixel_text;
|
|||
unsigned int cachedGlyph[CACHE_SIZE];
|
||||
NSSize cachedSize[CACHE_SIZE];
|
||||
|
||||
float lineHeight;
|
||||
CGFloat lineHeight;
|
||||
}
|
||||
@end
|
||||
|
||||
|
@ -154,7 +154,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
|
|||
|
||||
@implementation FTFontInfo
|
||||
- initWithFontName: (NSString *)name
|
||||
matrix: (const float *)fmatrix
|
||||
matrix: (const CGFloat *)fmatrix
|
||||
screenFont: (BOOL)p_screenFont
|
||||
{
|
||||
FT_Face face;
|
||||
|
@ -335,7 +335,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
|
|||
}
|
||||
|
||||
|
||||
-(float) defaultLineHeightForFont
|
||||
-(CGFloat) defaultLineHeightForFont
|
||||
{
|
||||
return lineHeight;
|
||||
}
|
||||
|
@ -1841,7 +1841,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
|
|||
}
|
||||
|
||||
|
||||
- (float) widthOfString: (NSString*)string
|
||||
- (CGFloat) widthOfString: (NSString*)string
|
||||
{
|
||||
unichar ch;
|
||||
int i, c = [string length];
|
||||
|
|
|
@ -113,7 +113,7 @@ static int subpixel_text;
|
|||
unsigned int cachedGlyph[CACHE_SIZE];
|
||||
NSSize cachedSize[CACHE_SIZE];
|
||||
|
||||
float lineHeight;
|
||||
CGFloat lineHeight;
|
||||
}
|
||||
@end
|
||||
|
||||
|
@ -167,7 +167,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib,
|
|||
@implementation FTFontInfo
|
||||
|
||||
- (id) initWithFontName: (NSString *)name
|
||||
matrix: (const float *)fmatrix
|
||||
matrix: (const CGFloat *)fmatrix
|
||||
screenFont: (BOOL)p_screenFont
|
||||
{
|
||||
NSArray *rfi;
|
||||
|
@ -411,7 +411,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib,
|
|||
return coveredCharacterSet;
|
||||
}
|
||||
|
||||
- (float) defaultLineHeightForFont
|
||||
- (CGFloat) defaultLineHeightForFont
|
||||
{
|
||||
return lineHeight;
|
||||
}
|
||||
|
@ -1753,7 +1753,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib,
|
|||
}
|
||||
|
||||
|
||||
- (float) widthOfString: (NSString*)string
|
||||
- (CGFloat) widthOfString: (NSString*)string
|
||||
{
|
||||
unichar ch;
|
||||
int i, c = [string length];
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
}
|
||||
|
||||
- (id) initWithFontName: (NSString *)name
|
||||
matrix: (const float *)fmatrix
|
||||
matrix: (const CGFloat *)fmatrix
|
||||
screenFont: (BOOL)p_screenFont
|
||||
{
|
||||
self = [super init];
|
||||
|
@ -189,7 +189,7 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (float) defaultLineHeightForFont
|
||||
- (CGFloat) defaultLineHeightForFont
|
||||
{
|
||||
return lineHeight;
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ BOOL _cairo_extents_for_NSGlyph(cairo_scaled_font_t *scaled_font, NSGlyph glyph,
|
|||
return NSZeroRect;
|
||||
}
|
||||
|
||||
- (float) widthOfString: (NSString *)string
|
||||
- (CGFloat) widthOfString: (NSString *)string
|
||||
{
|
||||
cairo_text_extents_t ctext;
|
||||
|
||||
|
|
|
@ -390,7 +390,7 @@ static float floatToUserSpace(NSAffineTransform *ctm, float f)
|
|||
- (void) GSSetFont: (GSFontInfo *)fontref
|
||||
{
|
||||
cairo_matrix_t font_matrix;
|
||||
const float *matrix;
|
||||
const CGFloat *matrix;
|
||||
|
||||
[super GSSetFont: fontref];
|
||||
|
||||
|
|
|
@ -263,7 +263,7 @@ fpfloat(FILE *stream, float f)
|
|||
|
||||
- (void) GSSetFont: (void *)fontref
|
||||
{
|
||||
const float *m = [(GSFontInfo *)fontref matrix];
|
||||
const CGFloat *m = [(GSFontInfo *)fontref matrix];
|
||||
fprintf(gstream, "/%s findfont ",
|
||||
[[(GSFontInfo *)fontref fontName] cString]);
|
||||
fprintf(gstream, "[");
|
||||
|
|
|
@ -43,7 +43,7 @@ NSString *win32_font_family(NSString *fontName);
|
|||
@implementation WIN32FontInfo
|
||||
|
||||
- initWithFontName: (NSString*)name
|
||||
matrix: (const float *)fmatrix
|
||||
matrix: (const CGFloat *)fmatrix
|
||||
screenFont: (BOOL)screenFont
|
||||
{
|
||||
if (screenFont)
|
||||
|
@ -75,7 +75,7 @@ NSString *win32_font_family(NSString *fontName);
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (float) widthOfString: (NSString*)string
|
||||
- (CGFloat) widthOfString: (NSString*)string
|
||||
{
|
||||
SIZE size;
|
||||
HDC hdc;
|
||||
|
|
|
@ -269,7 +269,7 @@ static NSArray *faFromFc(FcPattern *pat)
|
|||
@implementation GSXftFontInfo
|
||||
|
||||
- initWithFontName: (NSString*)name
|
||||
matrix: (const float *)fmatrix
|
||||
matrix: (const CGFloat*)fmatrix
|
||||
screenFont: (BOOL)screenFont
|
||||
{
|
||||
if (screenFont)
|
||||
|
@ -374,7 +374,7 @@ Ones(unsigned int n)
|
|||
return coveredCharacterSet;
|
||||
}
|
||||
|
||||
- (float) widthOfString: (NSString*)string
|
||||
- (CGFloat) widthOfString: (NSString*)string
|
||||
{
|
||||
XGlyphInfo extents;
|
||||
int len = [string length];
|
||||
|
@ -390,7 +390,7 @@ Ones(unsigned int n)
|
|||
return extents.width;
|
||||
}
|
||||
|
||||
- (float) widthOfGlyphs: (const NSGlyph *) glyphs length: (int) len
|
||||
- (CGFloat) widthOfGlyphs: (const NSGlyph *) glyphs length: (int) len
|
||||
{
|
||||
XGlyphInfo extents;
|
||||
XftChar16 buf[len];
|
||||
|
@ -477,7 +477,7 @@ Ones(unsigned int n)
|
|||
}
|
||||
|
||||
/*
|
||||
- (float) pointSize
|
||||
- (CGFloat) pointSize
|
||||
{
|
||||
Display *xdpy = [XGServer currentXDisplay];
|
||||
|
||||
|
@ -546,7 +546,7 @@ Ones(unsigned int n)
|
|||
}
|
||||
}
|
||||
|
||||
- (float) widthOf: (const char*) s length: (int) len
|
||||
- (CGFloat) widthOf: (const char*) s length: (int) len
|
||||
{
|
||||
XGlyphInfo extents;
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ static BOOL XGInitAtoms(Display *dpy)
|
|||
}
|
||||
|
||||
- initWithFontName: (NSString*)name
|
||||
matrix: (const float *)fmatrix
|
||||
matrix: (const CGFloat*)fmatrix
|
||||
screenFont: (BOOL)screenFont
|
||||
{
|
||||
if (screenFont)
|
||||
|
@ -228,7 +228,7 @@ static BOOL XGInitAtoms(Display *dpy)
|
|||
XDrawString(xdpy, draw, xgcntxt, xp.x, xp.y, buf, len);
|
||||
}
|
||||
|
||||
- (float) widthOfString: (NSString*)string
|
||||
- (CGFloat) widthOfString: (NSString*)string
|
||||
{
|
||||
NSData *d = [string dataUsingEncoding: mostCompatibleStringEncoding
|
||||
allowLossyConversion: YES];
|
||||
|
@ -239,12 +239,12 @@ static BOOL XGInitAtoms(Display *dpy)
|
|||
return XTextWidth(font_info, cstr, length);
|
||||
}
|
||||
|
||||
- (float) widthOf: (const char*) s length: (int) len
|
||||
- (CGFloat) widthOf: (const char*) s length: (int) len
|
||||
{
|
||||
return XTextWidth(font_info, s, len);
|
||||
}
|
||||
|
||||
- (float) widthOfGlyphs: (const NSGlyph *) glyphs length: (int) len
|
||||
- (CGFloat) widthOfGlyphs: (const NSGlyph *) glyphs length: (int) len
|
||||
{
|
||||
char buf[len];
|
||||
int i;
|
||||
|
|
|
@ -84,7 +84,7 @@ static BOOL char_struct_for_glyph(NSGlyph glyph, XFontSet font_set,
|
|||
@implementation XGFontSetFontInfo : GSFontInfo
|
||||
|
||||
- (id) initWithFontName: (NSString *)name
|
||||
matrix: (const float *)fmatrix
|
||||
matrix: (const CGFloat*)fmatrix
|
||||
screenFont: (BOOL)screenFont
|
||||
{
|
||||
Display *dpy;
|
||||
|
@ -217,7 +217,7 @@ static BOOL char_struct_for_glyph(NSGlyph glyph, XFontSet font_set,
|
|||
}
|
||||
}
|
||||
|
||||
- (float) widthOfGlyphs: (const NSGlyph *)glyphs
|
||||
- (CGFloat) widthOfGlyphs: (const NSGlyph *)glyphs
|
||||
length: (int)len
|
||||
{
|
||||
UTF8Str ustr;
|
||||
|
|
Loading…
Reference in a new issue