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);
auto cid = new PoDoFo::PdfFontCID(const_cast<PoDoFo::PdfFontMetrics*>(pCurFont->GetFontMetrics2()),
pCurFont->GetEncoding(), obj, true);
painter.SetFont(cid);
painter.SetColor(0, 0, 0);
PoDoFo::PdfString text(reinterpret_cast<const PoDoFo::pdf_utf8*>("??????hello"));
painter.DrawText(145, 413, 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