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

void PoDoFo::PdfFontType1::EmbedSubsetFont (  ) [protected, virtual]

Embeds pending subset-font into PDF page

Reimplemented from PoDoFo::PdfFont.

Definition at line 81 of file PdfFontType1.cpp.

References PoDoFo::PdfError::DebugMessage(), EmbedFontFile(), PoDoFo::PdfFont::GetEncoding(), and PoDoFo::PdfDifferenceEncoding::UnicodeIDToName().

{
      if ( m_bIsSubsetting  && m_bWasEmbedded == false )
      {
            std::vector<std::string> usedGlyphs;

            for ( int i = 0; i < 256; i++ )
            {
                  if ( (m_bUsed[i / 32] & (1 << (i % 32 ))) != 0 )
                        usedGlyphs.push_back( PdfDifferenceEncoding::UnicodeIDToName( GetEncoding()->GetCharCode(i) ).GetName() );
            }

            std::string xx( "Glyphs: " ) ;
            for ( int i = 0; i < static_cast<int>(usedGlyphs.size()); i++ )
                  xx += " " + usedGlyphs[i]; 

            PdfError::DebugMessage( "%s\n", xx.c_str() ); 

            // TODO: only embed with used glyphs
            EmbedFontFile( m_pDescriptor );
            m_bWasEmbedded = true;
      }
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index