Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

PoDoFo::PdfFontType1::PdfFontType1 ( PdfFontType1 pFont,
PdfFontMetrics pMetrics,
const char *  pszSuffix,
PdfVecObjects pParent 
)

Create a PdfFont based on an existing PdfFont with a new id

Parameters:
pFontpointer to existing font
pszSuffixSuffix to add to font-id
pParentparent of the font object

Definition at line 50 of file PdfFontType1.cpp.

References PoDoFo::PdfDictionary::AddKey(), PoDoFo::PdfVariant::GetDictionary(), PoDoFo::PdfFont::GetIdentifier(), PoDoFo::PdfDictionary::GetKey(), PoDoFo::PdfName::GetName(), PoDoFo::PdfElement::GetObject(), PoDoFo::PdfFontSimple::Init(), and PoDoFo::PdfVecObjects::RemoveObject().

    : PdfFontSimple( pMetrics, pFont->m_pEncoding, pParent )
{
      memset( m_bUsed, 0, sizeof( m_bUsed ) );
      // don't embedd font
    Init( false, PdfName("Type1") );

      // set identifier
      std::string id = pFont->GetIdentifier().GetName();
      id += pszSuffix;
      m_Identifier = id;

      // remove new FontDescriptor and use FontDescriptor of source font instead
      PdfObject* pObj = pParent->RemoveObject( GetObject()->GetIndirectKey( "FontDescriptor" )->Reference() );
      delete pObj;
      GetObject()->GetDictionary().AddKey( "FontDescriptor", pFont->GetObject()->GetDictionary().GetKey( "FontDescriptor" ) );
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index