freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft] Tutorial example segmentation fault


From: Michele Petrazzo
Subject: [ft] Tutorial example segmentation fault
Date: Fri, 02 Sep 2005 11:47:39 +0200
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050716)

I try to compile the example1.c found into the tutorial. It work well
until I use a very big character size like 1000 or bigger, but with
smaller size, it work well. With a debugger, I see that the problem is at:

image[j][i] |= bitmap->buffer[q * bitmap->width + p];

for example, if I execute the with the parameters:
FT_New_Face( library, "Arial.ttf", 0, &face )
FT_Set_Char_Size( face, 1500  * 64, 0, 96, 96 );
Character to write "K"

for ( i = x, p = 0; i < x_max; i++, p++ ) {
 for ( j = y, q = 0; j < y_max; j++, q++ ) {
  if ( i >= WIDTH || j >= HEIGHT )
        continue;
  image[j][i] |= bitmap->buffer[q * bitmap->width + p];
 }
}

it segfault on q = 58, p = 0, bitmap->width = 1233

It happen with all font file, like arial and vera on both my OS (win 2k
and linux)

Is there a solution?

Thanks,
Michele




reply via email to

[Prev in Thread] Current Thread [Next in Thread]