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

Reply via email to