freetype
[Top][All Lists]
Advanced

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

[Freetype] Same code works under linux, but not under windows


From: Emmanuel Vidal
Subject: [Freetype] Same code works under linux, but not under windows
Date: Thu, 1 Aug 2002 16:45:00 +0200

Hello,
 
I develop an application which have to works under linux and windows. I use the same version of the library, and the same source code for my app. I tried to display some text with arial: it works under the two OS. I tried with an other ttf (Bluehighway). It works under Linux, but not under Windows (I have 'E' instead of '(' for exemple). I don't understand why... Freetype2 doesn't send any error..
 
My code:
error = FT_Init_FreeType( &library );
error += FT_New_Face( library, "Bluehigh.ttf", 0, &face );
error += FT_Set_Char_Size( face, 0, 16*64, 100, 100);
error += FT_Set_Pixel_Sizes(face,0,16 );
error += FT_Load_Char( face, text[i], FT_LOAD_RENDER );
error = FT_Get_Glyph( face->glyph, &glyph );
  if ( glyph->format != ft_glyph_format_bitmap )              
  {                                                           
   error = FT_Glyph_To_Bitmap( &glyph, ft_render_mode_normal, 0, 1 );  
   if ( error ) // glyph unchanged                           
    break;
  }                                                           
                               
  // access bitmap content by typecasting                     
  glyph_bitmap = (FT_BitmapGlyph)glyph;                       
  unsigned char* buf = ((glyph_bitmap)->bitmap).buffer;
// now I display the bitmap
 
Thanks
 
Emmanuel Vidal
 
(Sorry for my bad english!)

reply via email to

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