freetype-devel
[Top][All Lists]
Advanced

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

Help,please !!!!!!!


From: Lidia Mirkin
Subject: Help,please !!!!!!!
Date: Wed, 28 Jun 2000 11:24:41 -0600

     Hello !
 I use freetype library in order to extract some information from ttf files
 and use it to embedd ttf file into pdf.
 In particular,I need to know char widths.My code is following:

> for (i=0;i<n;i++)
>  {
>   if (error=TT_Get_CharMap_ID( face, i, &platform, &encoding ))
>    goto done_face;
>   if ( (platform == 3 && encoding == 1 ) )
>   {
>    TT_Get_CharMap( face, i, &charMap );
>    break;
>   }
> ....
>  }
>  for (i=0;i<=255;i++)
>  {
>   unsigned short char_index=TT_Char_Index( charMap, i );
>   TT_Get_Face_Metrics( face,
>                        char_index,
>                        char_index,
>                        NULL,
>                        temp,
>                        NULL,
>                        NULL );
>
>   font->widths[i]=(int)(temp[0]*scale_factor+0.5);
>  }
>
For some fonts (for example , for Tahoma ) TT_Char_Index returns 0 ( unknown
 glyph)  for i>125 to 160 and as result , TT_Get_Face_Metrics returns 1000
 default
> width ).
But I did embedding of  this font into pfd using FreeHand .
Result is that for 160,161,162 widths are 1000 , but there are some other
values for next entries.
Does somebody know how can I extract these char widths ?

ttf2pt1(ttf2pfa) get valid values....

     thanks ,Lidia.






reply via email to

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