Hi,
What kind of "embedded fonts" are causing this problem? This should work
for all PdfFontMetricsFreetype implementation. We cannot provide fontdata
for the standard base 14 fonts.
If you are loading the font objects from existing PDFs, you could check if
the PdfFontMetricsFreetype object is initialized correctly with the data
stream.
At the end, you could also try to access the stream of the font object in
the PDF directly.
Regards,
Dom
On Mon, Dec 26, 2011 at 10:33 AM, kalyan chakravarthy <[email protected]>wrote:
> const PdfFontMetrics* pFontMetrics = pCurFont->GetFontMetrics();
>
> \if(!(pFontMetrics->GetFontData()))
> {
> cout<<"Font not found"<<endl;
>
> }
> else
> {
> FT_Long StreamSize = (FT_Long)pFontMetrics->GetFontDataLen();
> cout<<"Font stream size is "<<StreamSize<<endl;
> FT_Byte *fontStream = NULL;
> fontStream = (FT_Byte
> *)malloc(sizeof(FT_Byte)*(pFontMetrics->GetFontDataLen()));
> memcpy(fontStream,
> pFontMetrics->GetFontData(),pFontMetrics->GetFontDataLen());
> error = FT_New_Memory_Face(library, fontStream, StreamSize,0,&face);
> if(error)
> cout<<"Font not recognized"<<endl;
> else
> cout<<"Number of glyphs in font "<<fontName.GetName()<<" are
> "<<(long)face->num_glyphs << endl;
> }
>
>
> When this part of code is used, GetFontDataLen() and GetFontData()
> functions are not functioning as they are supposed to
> function. GetFontDataLen() is returning 0 and GetFontData() is returning
> NULL.
>
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users