Use local FT_Size variable instead of ivar. The ivar is sometimes

invalid.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25381 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2007-08-07 16:04:47 +00:00
parent 1e9445e2fe
commit 3e2f09cdab
2 changed files with 24 additions and 11 deletions

View file

@ -876,11 +876,16 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
{
NSMutableCharacterSet *m = [NSMutableCharacterSet new];
unsigned count = 0;
FT_Face face = ft_size->face;
FT_Face face;
FT_ULong charcode;
FT_UInt glyphindex;
FT_Size size;
charcode = FT_Get_First_Char(face, &glyphindex);
if (FTC_Manager_LookupSize(ftc_manager, &scaler, &size))
return nil;
face = size->face;
charcode = FT_Get_First_Char(face, &glyphindex);
if (glyphindex != 0)
{
NSRange range;
@ -2409,7 +2414,7 @@ p(t)=q(t)
/* TODO: try to combine charpath and NSBezierPath handling? */
static int charpath_move_to(FT_Vector *to, void *user)
static int charpath_move_to(const FT_Vector *to, void *user)
{
GSGState *self = (GSGState *)user;
NSPoint d;
@ -2420,7 +2425,7 @@ static int charpath_move_to(FT_Vector *to, void *user)
return 0;
}
static int charpath_line_to(FT_Vector *to, void *user)
static int charpath_line_to(const FT_Vector *to, void *user)
{
GSGState *self = (GSGState *)user;
NSPoint d;
@ -2430,7 +2435,7 @@ static int charpath_line_to(FT_Vector *to, void *user)
return 0;
}
static int charpath_conic_to(FT_Vector *c1, FT_Vector *to, void *user)
static int charpath_conic_to(const FT_Vector *c1, const FT_Vector *to, void *user)
{
GSGState *self = (GSGState *)user;
NSPoint a, b, c, d;
@ -2447,7 +2452,8 @@ static int charpath_conic_to(FT_Vector *c1, FT_Vector *to, void *user)
return 0;
}
static int charpath_cubic_to(FT_Vector *c1, FT_Vector *c2, FT_Vector *to, void *user)
static int charpath_cubic_to(const FT_Vector *c1, const FT_Vector *c2,
const FT_Vector *to, void *user)
{
GSGState *self = (GSGState *)user;
NSPoint b, c, d;
@ -2471,7 +2477,7 @@ static FT_Outline_Funcs charpath_funcs = {
};
static int bezierpath_move_to(FT_Vector *to, void *user)
static int bezierpath_move_to(const FT_Vector *to, void *user)
{
NSBezierPath *path = (NSBezierPath *)user;
NSPoint d;
@ -2482,7 +2488,7 @@ static int bezierpath_move_to(FT_Vector *to, void *user)
return 0;
}
static int bezierpath_line_to(FT_Vector *to, void *user)
static int bezierpath_line_to(const FT_Vector *to, void *user)
{
NSBezierPath *path = (NSBezierPath *)user;
NSPoint d;
@ -2492,7 +2498,7 @@ static int bezierpath_line_to(FT_Vector *to, void *user)
return 0;
}
static int bezierpath_conic_to(FT_Vector *c1, FT_Vector *to, void *user)
static int bezierpath_conic_to(const FT_Vector *c1, const FT_Vector *to, void *user)
{
NSBezierPath *path = (NSBezierPath *)user;
NSPoint a, b, c, d;
@ -2509,7 +2515,8 @@ static int bezierpath_conic_to(FT_Vector *c1, FT_Vector *to, void *user)
return 0;
}
static int bezierpath_cubic_to(FT_Vector *c1, FT_Vector *c2, FT_Vector *to, void *user)
static int bezierpath_cubic_to(const FT_Vector *c1, const FT_Vector *c2,
const FT_Vector *to, void *user)
{
NSBezierPath *path = (NSBezierPath *)user;
NSPoint b, c, d;
@ -3224,7 +3231,7 @@ fb04 'ffl'
unsigned int i,j;
unsigned int ch,ch2,ch3;
FTFontInfo *fi = [run->font fontInfo];
FTFontInfo *fi = (FTFontInfo *)[run->font fontInfo];
NSCharacterSet *cs = [NSCharacterSet controlCharacterSet];
IMP characterIsMember = [cs methodForSelector: @selector(characterIsMember:)];