freetype
[Top][All Lists]
Advanced

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

[Freetype] Renderer for embedded project not called, FTver2.0.8


From: Aman, Magnus
Subject: [Freetype] Renderer for embedded project not called, FTver2.0.8
Date: Thu, 30 May 2002 14:17:42 +0200

Team,
I am writing an OS-less embedded test application for ARM and use a 320 by
240 screen. Pixels in 16bit RGB.
Just aim for having B/W debug text output on screen for the moment.
Loading TTF glyphs work after selecting charmap and characters are
identified giving correct glyph indexes back.
However, the call " error = FT_Render_Glyph( face->glyph,
ft_render_mode_mono ); " crashes and it seems 
no renderer is found, thus there is no result in 'face->glyph->bitmap' at
all.  I want results....
Can my config be wrong? See contents of 'ftmodule.h' below.
Other pitfalls?
/Magnus Aman

[code:]

  error = FT_Init_FreeType( &library );
  if (error) { while(1); }
          
  error = FT_New_Memory_Face( library,
                              &Annifont_ttf[0],    /* first byte in memory
*/
                              37552,      /* size in bytes        */
                              0,              /* face_index           */
                              &face );
  if (error) { while(1); }  

  error = FT_Set_Char_Size( face,    /* handle to face object           */
                                 0,       /* char_width in 1/64th of points
*/
                                 12*64,   /* char_height in 1/64th of points
*/
                                 72,     /* horizontal device resolution
*/
                                 72 );   /* vertical device resolution
*/
  if (error) { while(1); } 

   
  error = FT_Select_Charmap( face, ft_encoding_unicode );
  if (error) { while(1); }

   //==========  End of font init, now use it  ============
   pen_x=0;
   pen_y=0;
   charcode='a';
   slot = face->glyph;
   
   for (charcode='a'; charcode<='z'; charcode++)
   {   
     glyph_index = FT_Get_Char_Index( face, charcode );
     error = FT_Load_Glyph( face, glyph_index, FT_LOAD_DEFAULT ); 
     if (error) { while(1); } 
     
     // convert to an anti-aliased bitmap
     error = FT_Render_Glyph( face->glyph, ft_render_mode_mono );
     if (error) { while(1); }        // STUCK HERE



[ftmodule.h]
// FT_USE_MODULE(autohint_module_class)
// FT_USE_MODULE(cff_driver_class)
// FT_USE_MODULE(t1cid_driver_class)
// FT_USE_MODULE(pcf_driver_class)
// FT_USE_MODULE(psaux_module_class)
FT_USE_MODULE(psnames_module_class)
// FT_USE_MODULE(pshinter_module_class)
// FT_USE_MODULE(ft_raster1_renderer_class)
FT_USE_MODULE(sfnt_module_class)
// FT_USE_MODULE(ft_smooth_renderer_class)
FT_USE_MODULE(tt_driver_class)
// FT_USE_MODULE(t1_driver_class)
// FT_USE_MODULE(winfnt_driver_class)



reply via email to

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