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)
|