freetype
[Top][All Lists]
Advanced

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

[ft] Fw: Problem with fetching Anti-aliased data


From: Werner LEMBERG
Subject: [ft] Fw: Problem with fetching Anti-aliased data
Date: Thu, 29 Jan 2009 16:00:21 +0100 (CET)

Please help this guy.


    Werner
--- Begin Message --- Subject: Problem with fetching Anti-aliased data Date: Thu, 29 Jan 2009 17:44:54 +0530 User-agent: Thunderbird 2.0.0.19 (Windows/20081209)
Hi Werner Sir,
I want to fetch bitmap data from face->glyph->bitmap.buffer as an anti-aliased data.
What I am getting is all 0s their, instead of  actual bitmap data. And bitmap_left and bitmap_top are also 0 zero.
  Code I used is as follow..
{
j = glyph_index;
err = FT_Load_Glyph (face, j, FT_LOAD_DEFAULT);
         FT_Render_Glyph (face->glyph, FT_RENDER_MODE_NORMAL);
          
#if 0
               memcpy (fontGlyphArray[j].buffer,
                  face->glyph->bitmap.buffer,
                  (face->glyph->bitmap.rows * face->glyph->bitmap.pitch));
#endif      
               /* Alternate to memcpy */
               for(k=0;k < (face->glyph->bitmap.rows * face->glyph->bitmap.pitch); k++)
               {
                  fontGlyphArray[j].buffer[k] = face->glyph->bitmap.buffer[k];
               }
               fontGlyphArray[j].height = face->glyph->bitmap.rows;
               fontGlyphArray[j].width = face->glyph->bitmap.width;
               fontGlyphArray[j].pitch = face->glyph->bitmap.pitch;
               fontGlyphArray[j].bpp = face->glyph->bitmap.pixel_mode;
               fontGlyphArray[j].bitmap_left = face->glyph->bitmap_left;
               fontGlyphArray[j].bitmap_top = face->glyph->bitmap_top;
               fontGlyphArray[j].horiAdvance = face->glyph->metrics.horiAdvance;
}

I am fresher and just now completed my education. Will you plz. help me.

Thanx and Regards
Govind
Bangalore(India)


--- End Message ---

reply via email to

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