freetype
[Top][All Lists]
Advanced

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

Re: [ft] diff Pixel height


From: samaram s
Subject: Re: [ft] diff Pixel height
Date: Mon, 8 Feb 2010 11:44:50 -0500

 
error = FT_Set_Char_Size( face,10*64,0,72,0 );

 /*The pen position in 26.6 cartesian space coordinates; */
        pen.x = 0;
        pen.y = 0;

 FT_Set_Transform(face,0,&pen);
 glyph_index = FT_Get_Char_Index( face,text[n] );
 //printf(" Glyph_Index = %.2x\n",glyph_index);
 error = FT_Load_Glyph( face, glyph_index, FT_LOAD_RENDER|FT_LOAD_MONOCHROME);
 error = FT_Get_Glyph (face->glyph, &glyph);

 FT_Glyph_Get_CBox(glyph, FT_GLYPH_BBOX_PIXELS, &bbox);
fprintf( stderr, "bbox = [%ld %ld %ld %ld] \n",
                                                bbox.xMin, bbox.yMin, bbox.xMax, bbox.yMax );



Arial.ttf,72dpi and any point you can use either 10,11,12,14 etc.....

Thanks Werner




On Mon, Feb 8, 2010 at 11:11 AM, Werner LEMBERG <address@hidden> wrote:

> I am using Arial.ttf file, If i use pen.x and pen.y = 0, I am
> getting x min for few characters as -1.  Is it correct?

I will check.  Which dpi and pt values are you using?


   Werner


reply via email to

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