Hi! I once created this functionality specially for my use case of drawing special chars from type1-fonts. As a difference encoding is needed, i created a duplicate of the font for this purpose. If we already have a duplicate of the font, this is used and up to 255 glyphs can be entered. But you should get an assertion from PdfFontCache::GetDuplicateFontType1, if the font is not types1
Uli -----Ursprüngliche Nachricht----- Von: Simon Cozens [mailto:si...@simon-cozens.org] Gesendet: Sonntag, 21. September 2014 16:14 An: zyx Cc: podofo-us...@lists.sf.net Betreff: Re: [Podofo-users] [PATCH] Allow DrawGlyph to be used when notsubsetting On 15/09/2014 02:27, zyx wrote: > thanks for the patch. I committed it as r1664: > http://sourceforge.net/p/podofo/code/1664 Thanks for this. There is still something wrong with PdfPainter::DrawGlyph but I am not sure how to fix it; in particular this line: PdfFont* pGlyphFont = pDocument->CreateDuplicateFontType1( m_pFont, "Glyph1" ); (a) looks Type1 specific when there's no guarantee that Type1 fonts are being used, and (b) certainly allocates a massive amount of memory when Type1 fonts are not being used. (It creates a new font for every call to DrawGlyph, and I'm calling it a lot.) If I change it to the (obviously incorrect) PdfFont* pGlyphFont = m_pFont; then there is no loss of functionality for me and no memory growth when using TTF fonts. However, it obviously forces the font into difference encoding. I don't know what the implications of that are because I'm only using fonts via DrawGlyph. Does there need to be a CreateDuplicateFontTTF? ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users