I want to use these font to draw text. 


as subType is Type0??I get the font from resource??and new a PdfFontCID object. 
I tried code like below, it dosen't work, just show a blank page


    auto type = PoDoFo::PdfName("Font");
    auto name = PoDoFo::PdfName("F25");
    auto obj = page->GetFromResources(type, name);
    if (obj == NULL) {
      printf("nothing found\n");
    }
    PoDoFo::PdfFont* pCurFont = doc.GetFont(obj);
    pCurFont->SetFontSize(11);
&nbsp;&nbsp;&nbsp;&nbsp;auto&nbsp;cid&nbsp;=&nbsp;new&nbsp;PoDoFo::PdfFontCID(const_cast<PoDoFo::PdfFontMetrics*&gt;(pCurFont-&gt;GetFontMetrics2()),
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pCurFont-&gt;GetEncoding(),&nbsp;obj,&nbsp;true);
&nbsp;&nbsp;&nbsp;&nbsp;painter.SetFont(cid);

&nbsp;&nbsp;&nbsp;&nbsp;painter.SetColor(0,&nbsp;0,&nbsp;0);
&nbsp;&nbsp;&nbsp;&nbsp;PoDoFo::PdfString&nbsp;text(reinterpret_cast<const&nbsp;PoDoFo::pdf_utf8*&gt;("??????hello"));
&nbsp;&nbsp;&nbsp;&nbsp;painter.DrawText(145,&nbsp;413,&nbsp;text);




If I didn't descirde clearly or you need more details??please reply to let me 
know.


hope for your reply, thanks
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to